Handle subsurfaces with async configure

With XDG Shell we cannot map a buffer until we get a configure event.
To handle this the normal expose events is blocked then sent explicitly
when we get this request.

This works, but we also need to notify that subsurfaces are now exposed
with the parent.

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-119882
Fixes: QTBUG-119883
Change-Id: I0ae69c8da702037e7575cfc0939d3e783b50f323
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
David Edmundson 2023-12-08 14:46:44 +00:00 committed by Liang Qi
parent ea5d6d8748
commit d338d7c9fb
2 changed files with 2 additions and 2 deletions

View File

@ -606,7 +606,7 @@ void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial)
// We have to do the initial applyConfigure() immediately, since that is the expose.
applyConfigure();
if (isExposed())
m_window->handleExpose(QRect(QPoint(), m_window->geometry().size()));
m_window->sendRecursiveExposeEvent();
} else {
// Later configures are probably resizes, so we have to queue them up for a time when we
// are not painting to the window.

View File

@ -232,6 +232,7 @@ public:
void endFrame();
void closeChildPopups();
void sendRecursiveExposeEvent();
virtual void reinit();
void reset();
@ -353,7 +354,6 @@ private:
void handleScreensChanged();
void updateScale();
void setScale(qreal newScale);
void sendRecursiveExposeEvent();
QWaylandWindow *guessTransientParent() const;
void addChildPopup(QWaylandWindow *child);