summaryrefslogtreecommitdiff
path: root/src/client/qwaylandwindow_p.h
diff options
context:
space:
mode:
authorWeng Xuetian <wengxt@gmail.com>2022-07-20 15:57:40 -0700
committerWeng Xuetian <wengxt@gmail.com>2022-07-24 05:20:34 +0000
commitf8e3257e9b1e22d52e9c221c62b8d9b6dd1151a3 (patch)
tree457c0d3573d3c3bbc843b5a1f809f9e9bc081aa0 /src/client/qwaylandwindow_p.h
parentd07192aae463a615e0b0fe86a076c1a61a9b2560 (diff)
downloadqtwayland-f8e3257e9b1e22d52e9c221c62b8d9b6dd1151a3.tar.gz
Only close popup in the the hierchary
Imagine following event sequences: 1. a tooltip is shown. activePopups = {tooltip} 2. user click menu bar to show the menu, QMenu::setVisible is called. now activePopups(tooltip, menu} 3. tooltip visibility changed to false. 4. closePopups() close both tooltip and menu. This is a common pattern under wayland that menu is shown as a invisible state. This patch tries to memorize the surface hierchary used to create the popup role. And only close those popups whose ancesotor is hidden. Pick-to: 6.4 Change-Id: I78aa0b4e32a5812603e003e756d8bcd202e94af4 Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
-rw-r--r--src/client/qwaylandwindow_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index d2d4d659..ea30d9b8 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -206,6 +206,10 @@ public:
void beginFrame();
void endFrame();
+ void addChildPopup(QWaylandWindow* child);
+ void removeChildPopup(QWaylandWindow* child);
+ void closeChildPopups();
+
public slots:
void applyConfigure();
@@ -292,6 +296,8 @@ protected:
QMargins mCustomMargins;
+ QList<QPointer<QWaylandWindow>> mChildPopups;
+
private:
void setGeometry_helper(const QRect &rect);
void initWindow();