diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-12-05 12:24:07 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2020-01-04 23:54:35 +0000 |
commit | 1e1f692dbdb0b1b8a1bbed99b5ff550dc978cdcd (patch) | |
tree | 0b644ce7da63b8b83a6a6238b0a255873b2382fb | |
parent | f924acaf3d4c927d7d3283e752b82bf120b2c13e (diff) |
Client: Always close popups when hiding a window
It's not just popups that may have popups open on them. Always close open
popups when hiding a window to prevent dangling pointers.
[ChangeLog][QPA plugin] Fixed a crash when re-showing a popup after hiding its
parent.
Fixes: QTBUG-80562
Change-Id: I7cdac5c7a30e0add5ebf00259401e4d74626ce96
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 7c0833f4bc22d2d947c793f0711e3f1e1a09012c)
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
-rw-r--r-- | src/client/qwaylandwindow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 9e63fa17a..7a99363c8 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -424,8 +424,7 @@ void QWaylandWindow::setVisible(bool visible) // QWaylandShmBackingStore::beginPaint(). } else { sendExposeEvent(QRect()); - if (window()->type() == Qt::Popup) - closePopups(this); + closePopups(this); reset(); } } |