summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2020-07-26 17:56:25 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-08-21 17:20:34 +0000
commit7d7ac7f0a4bd6a7956448ddb0ba44c12755dca2e (patch)
tree7176c46a5cb33fafcb645844390108a62d8c2e70
parentb7b0602d8b17aa7cf6de543a2e872c8edd6bcf18 (diff)
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 Fixes: QTBUG-86176 Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit e20e1d506d627a53d9d7bf7794b93bf9e8b9bedb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylandwindow.cpp14
-rw-r--r--src/client/qwaylandwindow_p.h1
2 files changed, 14 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 2e0614ec9..7c2815f68 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -518,10 +518,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());
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index be06e435f..948e0ea7a 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -271,6 +271,7 @@ private:
void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e);
void handleScreensChanged();
+ void sendRecursiveExposeEvent();
bool mInResizeFromApplyConfigure = false;
bool lastVisible = false;