commit:     efc9f2cf754d49ab5d48270f9dde18b58aaa01c8
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  4 23:44:04 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jun  4 23:48:32 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efc9f2cf

dev-qt/qtdeclarative: backport fix for QTBUG-135158

Not a major issue but 6.9.2 is rather far off and it may
be annoying to leave it like this.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/qtdeclarative-6.9.1-QTBUG-135158.patch           | 14 ++++++++++++++
 ...larative-6.9.1.ebuild => qtdeclarative-6.9.1-r1.ebuild} |  4 ++++
 2 files changed, 18 insertions(+)

diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-6.9.1-QTBUG-135158.patch 
b/dev-qt/qtdeclarative/files/qtdeclarative-6.9.1-QTBUG-135158.patch
new file mode 100644
index 000000000000..d4ee052f8522
--- /dev/null
+++ b/dev-qt/qtdeclarative/files/qtdeclarative-6.9.1-QTBUG-135158.patch
@@ -0,0 +1,14 @@
+https://bugreports.qt.io/browse/QTBUG-135158
+https://codereview.qt-project.org/c/qt/qtdeclarative/+/647212
+--- a/src/quicktemplates/qquickpopuppositioner.cpp
++++ b/src/quicktemplates/qquickpopuppositioner.cpp
+@@ -321,5 +321,8 @@
+                                                  : 
p->parentItem->mapToGlobal(windowPos.x(), windowPos.y());
+     QRectF rect = { globalCoords.x(), globalCoords.y(), popupItem->width(), 
popupItem->height() };
+-    if (!skipFittingStep) {
++
++    // QTBUG-99618: On wayland, we can't use QWindow::mapToGlobal(), and 
should use a xdg_positioner instead.
++    static bool isWayland = 
QGuiApplication::platformName().startsWith(QLatin1String("wayland"));
++    if (!skipFittingStep && !isWayland) {
+         const QScreen *screenAtPopupPosition = 
QGuiApplication::screenAt(globalCoords.toPoint());
+         const QScreen *screen = screenAtPopupPosition ? screenAtPopupPosition 
: QGuiApplication::primaryScreen();

diff --git a/dev-qt/qtdeclarative/qtdeclarative-6.9.1.ebuild 
b/dev-qt/qtdeclarative/qtdeclarative-6.9.1-r1.ebuild
similarity index 96%
rename from dev-qt/qtdeclarative/qtdeclarative-6.9.1.ebuild
rename to dev-qt/qtdeclarative/qtdeclarative-6.9.1-r1.ebuild
index d9c1d4f601aa..2b9c1ea26d3e 100644
--- a/dev-qt/qtdeclarative/qtdeclarative-6.9.1.ebuild
+++ b/dev-qt/qtdeclarative/qtdeclarative-6.9.1-r1.ebuild
@@ -32,6 +32,10 @@ BDEPEND="
        ~dev-qt/qtshadertools-${PV}:6
 "
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-6.9.1-QTBUG-135158.patch
+)
+
 src_configure() {
        local mycmakeargs=(
                $(cmake_use_find_package qmlls Qt6LanguageServerPrivate)

Reply via email to