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@gentoo.org>
This commit is contained in:
Ionen Wolkens
2025-06-04 19:48:32 -04:00
parent ae6808b6f3
commit efc9f2cf75
2 changed files with 18 additions and 0 deletions
@@ -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();
@@ -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)