Client: Send subsurface expose event when toplevel is configured
If a subsurface is set to be visible on the cilent side before the top level is configured it will do not create an exposeEvent and map a buffer as we fail the check in isExposed() where we check the parent. This is correct behavior. However, when the toplevel receives an applyConfigure from the shell client we need subsurfaces to update accordingly. This fixes a race where subsurfaces are not shown with slow compositors. Change-Id: Icd156e7655d5b25535acc4d2fe77c31e19ebfa32 Pick-to: 5.15 Fixes: QTBUG-86176 Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
8631b43a2d
commit
6d8b4bbadb
@ -516,10 +516,22 @@ void QWaylandWindow::applyConfigure()
|
||||
doApplyConfigure();
|
||||
|
||||
lock.unlock();
|
||||
sendExposeEvent(QRect(QPoint(), geometry().size()));
|
||||
sendRecursiveExposeEvent();
|
||||
QWindowSystemInterface::flushWindowSystemEvents();
|
||||
}
|
||||
|
||||
void QWaylandWindow::sendRecursiveExposeEvent()
|
||||
{
|
||||
if (!window()->isVisible())
|
||||
return;
|
||||
sendExposeEvent(QRect(QPoint(), geometry().size()));
|
||||
|
||||
for (QWaylandSubSurface *subSurface : qAsConst(mChildren)) {
|
||||
auto subWindow = subSurface->window();
|
||||
subWindow->sendRecursiveExposeEvent();
|
||||
}
|
||||
}
|
||||
|
||||
void QWaylandWindow::attach(QWaylandBuffer *buffer, int x, int y)
|
||||
{
|
||||
Q_ASSERT(!buffer->committed());
|
||||
|
@ -271,6 +271,7 @@ private:
|
||||
|
||||
void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e);
|
||||
void handleScreensChanged();
|
||||
void sendRecursiveExposeEvent();
|
||||
|
||||
bool mInResizeFromApplyConfigure = false;
|
||||
bool lastVisible = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user