path: root/src/client/qwaylandwindow_p.h
diff options
authorJohan Klokkhammer Helsing <>2019-06-19 14:05:22 +0200
committerJohan Klokkhammer Helsing <>2019-06-20 14:04:04 +0200
commitec9057081f1094fbfeb11449bc533997731e4079 (patch)
tree895efd859441817dfa2dcc3fc3d49b46114dc270 /src/client/qwaylandwindow_p.h
parent7fe99c1d78125b4b2b3ae7c2317b73acebb21425 (diff)
Client: Fix stuttering when the GUI thread is busy
When we did invokeMethod for handling the frame callbacks, we had to wait for the GUI thread to finish whatever it's doing before we would stop blocking. Fix it by clearing the frame callback timer and stop blocking immediately, while delaying the rest of the work until it can be run on the other thread. Fixes: QTBUG-76397 Change-Id: I343e4feac4838926b4fa2ccac2948988bc6c3bb7 Reviewed-by: Paul Olav Tvete <>
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index c47123dc..e8c9d568 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -216,7 +216,7 @@ protected:
WId mWindowId;
bool mWaitingForFrameCallback = false;
bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out
- int mFrameCallbackTimerId = -1; // Started on commit, reset on frame callback
+ QAtomicInt mFrameCallbackTimerId = -1; // Started on commit, reset on frame callback
struct ::wl_callback *mFrameCallback = nullptr;
struct ::wl_event_queue *mFrameQueue = nullptr;
QWaitCondition mFrameSyncWait;