From 1e1f692dbdb0b1b8a1bbed99b5ff550dc978cdcd Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 5 Dec 2019 12:24:07 +0100 Subject: 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 Reviewed-by: David Edmundson (cherry picked from commit 7c0833f4bc22d2d947c793f0711e3f1e1a09012c) Reviewed-by: Shawn Rutledge Reviewed-by: Pier Luigi Fiorini --- src/client/qwaylandwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/client/qwaylandwindow.cpp') 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(); } } -- cgit v1.2.3