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>
This commit is contained in:
Johan Klokkhammer Helsing 2019-12-05 12:24:07 +01:00
parent e3764dff85
commit e86d199546

View File

@ -426,8 +426,7 @@ void QWaylandWindow::setVisible(bool visible)
// QWaylandShmBackingStore::beginPaint().
} else {
sendExposeEvent(QRect());
if (window()->type() == Qt::Popup)
closePopups(this);
closePopups(this);
reset();
}
}