summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r--src/client/qwaylandwindow.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 1ede38275..05e7160be 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -716,9 +716,12 @@ void QWaylandWindow::handleFrameCallback()
mFrameCallbackElapsedTimer.invalidate();
// The rest can wait until we can run it on the correct thread
- // Queued connection, to make sure we don't call handleUpdate() from inside waitForFrameSync()
- // in the single-threaded case.
- QMetaObject::invokeMethod(this, &QWaylandWindow::doHandleFrameCallback, Qt::QueuedConnection);
+ if (!mWaitingForUpdateDelivery) {
+ // Queued connection, to make sure we don't call handleUpdate() from inside waitForFrameSync()
+ // in the single-threaded case.
+ mWaitingForUpdateDelivery = true;
+ QMetaObject::invokeMethod(this, &QWaylandWindow::doHandleFrameCallback, Qt::QueuedConnection);
+ }
mFrameSyncWait.notify_all();
}
@@ -731,6 +734,8 @@ void QWaylandWindow::doHandleFrameCallback()
sendExposeEvent(QRect(QPoint(), geometry().size()));
if (wasExposed && hasPendingUpdateRequest())
deliverUpdateRequest();
+
+ mWaitingForUpdateDelivery = false;
}
bool QWaylandWindow::waitForFrameSync(int timeout)