commit:     3e07e0e6e22f979990f1fb81aae992e92101271d
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 16 17:41:51 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 17:54:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e07e0e6

dev-qt/qtwayland: backport yet another fix for plasma

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

 .../files/qtwayland-6.7.2-null-screen.patch        | 29 ++++++++++++++++++++++
 ...d-6.7.2-r2.ebuild => qtwayland-6.7.2-r3.ebuild} |  1 +
 2 files changed, 30 insertions(+)

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 <[email protected]>
+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
similarity index 97%
rename from dev-qt/qtwayland/qtwayland-6.7.2-r2.ebuild
rename to 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=(

Reply via email to