diff options
4 files changed, 19 insertions, 9 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index ad7fe680..ae4fc577 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -396,14 +396,9 @@ void QWaylandWindow::setVisible(bool visible) // QWaylandShmBackingStore::beginPaint(). } else { sendExposeEvent(QRect()); - // when flushing the event queue, it could contain a close event, in which - // case 'this' will be deleted. When that happens, we must abort right away. - QPointer<QWaylandWindow> deleteGuard(this); - QWindowSystemInterface::flushWindowSystemEvents(); - if (!deleteGuard.isNull() && window()->type() == Qt::Popup) + if (window()->type() == Qt::Popup) closePopups(this); - if (!deleteGuard.isNull()) - reset(); + reset(); } } diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index 6455b6fa..042aa11d 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -145,6 +145,7 @@ public: } void blit(QWaylandEglWindow *window) { + Q_ASSERT(window->wl_surface::isInitialized()); QOpenGLTextureCache *cache = QOpenGLTextureCache::cacheForContext(m_context->context()); QSize surfaceSize = window->surfaceSize(); diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp index 60540fb0..980e4a60 100644 --- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp +++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp @@ -380,7 +380,14 @@ void QWaylandXdgSurfaceV6::setGrabPopup(QWaylandWindow *parent, QWaylandInputDev auto *top = m_shell->m_topmostGrabbingPopup; if (top && top->m_xdgSurface != parentXdgSurface) { - qCWarning(lcQpaWayland) << "setGrabPopup called for a surface that was not the topmost popup, positions might be off."; + qCWarning(lcQpaWayland) << "setGrabPopup called with a parent," << parentXdgSurface + << "which does not match the current topmost grabbing popup," + << top->m_xdgSurface << "According to the xdg-shell-v6 protocol, this" + << "is not allowed. The wayland QPA plugin is currently handling" + << "it by setting the parent to the topmost grabbing popup." + << "Note, however, that this may cause positioning errors and" + << "popups closing unxpectedly because xdg-shell-v6 mandate that child" + << "popups close before parents"; parent = top->m_xdgSurface->m_window; } setPopup(parent); diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index 78b7b45c..385651bb 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -414,7 +414,14 @@ void QWaylandXdgSurface::setGrabPopup(QWaylandWindow *parent, QWaylandInputDevic auto *top = m_shell->m_topmostGrabbingPopup; if (top && top->m_xdgSurface != parentXdgSurface) { - qCWarning(lcQpaWayland) << "setGrabPopup called for a surface that was not the topmost popup, positions might be off."; + qCWarning(lcQpaWayland) << "setGrabPopup called with a parent," << parentXdgSurface + << "which does not match the current topmost grabbing popup," + << top->m_xdgSurface << "According to the xdg-shell protocol, this" + << "is not allowed. The wayland QPA plugin is currently handling" + << "it by setting the parent to the topmost grabbing popup." + << "Note, however, that this may cause positioning errors and" + << "popups closing unxpectedly because xdg-shell mandate that child" + << "popups close before parents"; parent = top->m_xdgSurface->m_window; } setPopup(parent); |