summaryrefslogtreecommitdiff
path: root/dev-qt/qtwayland/files/qtwayland-6.7.2-plasma-popup.patch
blob: 25c7918a5a8b13e0cd1e6bddbb993dd73808f418 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Fixed in qtwayland-6.7.3

https://mail.kde.org/pipermail/distributions/2024-July/001512.html
https://invent.kde.org/qt/qt/qtwayland/-/commit/92bcb8f6b7a852c7a5d662fc34de561692a7a454
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Thu, 20 Jun 2024 11:25:06 +0300
Subject: [PATCH] Client: Ensure that guessed popup parent has a shell surface

The last input window may not have a shell surface if it is a subsurface
or that window has been just made invisible.
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -1157,8 +1157,10 @@ QWaylandWindow *QWaylandWindow::guessTransientParent() const
             return mTopPopup;
     }
 
-    if (window()->type() == Qt::ToolTip || window()->type() == Qt::Popup)
-        return display()->lastInputWindow();
+    if (window()->type() == Qt::ToolTip || window()->type() == Qt::Popup) {
+        if (auto lastInputWindow = display()->lastInputWindow())
+            return closestShellSurfaceWindow(lastInputWindow->window());
+    }
 
     return nullptr;
 }