From 727e115a8109c66e2b3008456ff2ff3fd859d63d Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 29 Mar 2025 11:28:47 +0200 Subject: [PATCH] Client: Notify about exposure changes when popup is repositioned QXdgSurface::Popup::setWindowPosition() changes the exposed state, but it doesn't call QWindowSystemInterface::handleExposeEvent() to notify the QGuiApplication layer about it. For example, this can result in the QMenu unexpectedly repainting with the new size even though QtWayland still waits for the reposition request to be completed. xdg_popup_repositioned doesn't need to call updateExposure() because it is going to be followed by a configure event and QWaylandXdgSurface::applyConfigure() already updates the exposed state. Pick-to: 6.9 Change-Id: Ia0435e2cd1a0d39e0edac61beb4c0d761314c1d6 Reviewed-by: David Edmundson --- .../plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index 29c7cbf55d9..5fd718e697b 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -680,6 +680,7 @@ void QWaylandXdgSurface::setWindowPosition(const QPoint &position) m_popup->m_waitingForRepositionSerial++; m_popup->reposition(positioner->object(), m_popup->m_waitingForRepositionSerial); m_popup->m_waitingForReposition = true; + window()->updateExposure(); } std::unique_ptr QWaylandXdgSurface::createPositioner(QWaylandWindow *parent)