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 <davidedmundson@kde.org>
This commit is contained in:
Vlad Zahorodnii 2025-03-29 11:28:47 +02:00
parent f9e319dde3
commit 727e115a81

View File

@ -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::Positioner> QWaylandXdgSurface::createPositioner(QWaylandWindow *parent)