Client: Workaround for QPlatformWindow::setVisible(true) being called twice
Fixes a crash. Otherwise we created two shell surface objects in some cases. Change-Id: Ieded56261061da6acf27ccabba81c8f578ca1596 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
This commit is contained in:
parent
a23d0f4587
commit
75fd4b4669
@ -414,6 +414,11 @@ QPlatformScreen *QWaylandWindow::calculateScreenFromSurfaceEvents() const
|
||||
|
||||
void QWaylandWindow::setVisible(bool visible)
|
||||
{
|
||||
// Workaround for issue where setVisible may be called with the same value twice
|
||||
if (lastVisible == visible)
|
||||
return;
|
||||
lastVisible = visible;
|
||||
|
||||
if (visible) {
|
||||
if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
|
||||
activePopups << this;
|
||||
|
@ -270,6 +270,7 @@ private:
|
||||
void handleScreensChanged();
|
||||
|
||||
bool mInResizeFromApplyConfigure = false;
|
||||
bool lastVisible = false;
|
||||
QRect mLastExposeGeometry;
|
||||
|
||||
static const wl_callback_listener callbackListener;
|
||||
|
Loading…
x
Reference in New Issue
Block a user