From e86d1995461b79a184783189c2d91ab56f11d878 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 5 Dec 2019 12:24:07 +0100 Subject: [PATCH] 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 --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 950486c0cfe..0df99d9fe6c 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -426,8 +426,7 @@ void QWaylandWindow::setVisible(bool visible) // QWaylandShmBackingStore::beginPaint(). } else { sendExposeEvent(QRect()); - if (window()->type() == Qt::Popup) - closePopups(this); + closePopups(this); reset(); } }