summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-07-16 13:41:51 -0400
committerIonen Wolkens <ionen@gentoo.org>2024-07-16 13:54:51 -0400
commit3e07e0e6e22f979990f1fb81aae992e92101271d (patch)
treea3c84e23f85f70bc16c1385a534ed47358c74f31 /dev-qt
parentsys-kernel/vanilla-sources: add 6.6.40, drop 6.6.39 (diff)
downloadgentoo-3e07e0e6e22f979990f1fb81aae992e92101271d.tar.gz
gentoo-3e07e0e6e22f979990f1fb81aae992e92101271d.tar.bz2
gentoo-3e07e0e6e22f979990f1fb81aae992e92101271d.zip
dev-qt/qtwayland: backport yet another fix for plasma
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtwayland/files/qtwayland-6.7.2-null-screen.patch29
-rw-r--r--dev-qt/qtwayland/qtwayland-6.7.2-r3.ebuild (renamed from dev-qt/qtwayland/qtwayland-6.7.2-r2.ebuild)1
2 files changed, 30 insertions, 0 deletions
diff --git a/dev-qt/qtwayland/files/qtwayland-6.7.2-null-screen.patch b/dev-qt/qtwayland/files/qtwayland-6.7.2-null-screen.patch
new file mode 100644
index 000000000000..6a7e85a8f4b6
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-6.7.2-null-screen.patch
@@ -0,0 +1,29 @@
+Backport of [1] for [2], will be fixed in qtwayland-6.7.3.
+
+[1] https://codereview.qt-project.org/c/qt/qtwayland/+/576718
+[2] https://bugs.kde.org/show_bug.cgi?id=489072
+
+From: David Edmundson <davidedmundson@kde.org>
+Date: Wed, 10 Jul 2024 09:00:33 +0100
+Subject: [PATCH] client: Guard against windows being on a null screen
+
+calculateScreenFromSurfaceEvents uses the screen information from our
+surface enter events. If this is not set yet, or refers to outputs not
+yet complete we fall back to the QWindow::screen. This was introduced in
+e03613524fc9f6be5c4cd7e9bdb00bc09c7f1e0b.
+
+It was assumed that this would always be a valid value as QtBase keeps
+it updated, but there are apparently paths for it to still be null.
+
+It will be evaluated again when the surface receives a wl_enter event or
+the output that we have entered is finally initialised and we will then
+be marked as on the correct screen.
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -1406,5 +1406,5 @@
+ QPlatformScreen *newScreen = calculateScreenFromSurfaceEvents();
+
+- if (newScreen->screen() == window()->screen())
++ if (!newScreen || newScreen->screen() == window()->screen())
+ return;
+
diff --git a/dev-qt/qtwayland/qtwayland-6.7.2-r2.ebuild b/dev-qt/qtwayland/qtwayland-6.7.2-r3.ebuild
index eab3c3a8d3a5..7124b7617bf1 100644
--- a/dev-qt/qtwayland/qtwayland-6.7.2-r2.ebuild
+++ b/dev-qt/qtwayland/qtwayland-6.7.2-r3.ebuild
@@ -32,6 +32,7 @@ PATCHES=(
"${FILESDIR}"/${P}-plasma-popup.patch
"${FILESDIR}"/${P}-drag-drop.patch
"${FILESDIR}"/${P}-thread-safety.patch
+ "${FILESDIR}"/${P}-null-screen.patch
)
CMAKE_SKIP_TESTS=(