From 6793a0a907f3aa92f8f8bd5448505c152d0e3a3d Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 8 Jan 2018 13:30:51 +0100 Subject: Fix requestUpdate() After commit 3e745ea053e42ba087438203df3bd76b30a08eb2, mFrameCallback is set to null when the next buffer is attached, not when the callback arrives. This means that a requestUpdate() after the frame callback would never be delivered. The solution is to test mWaitingForFrameSync instead. There is still a small race condition, but the failure case is that the update will arrive after 5 ms instead of exactly at frame sync. Change-Id: I413ed2b76c8527f825e501077bab712146b6705f Reviewed-by: Johan Helsing --- src/client/qwaylandwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 6d7c0885c..d98708100 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -1029,7 +1029,7 @@ QVariant QWaylandWindow::property(const QString &name, const QVariant &defaultVa void QWaylandWindow::requestUpdate() { - if (!mFrameCallback) + if (!mWaitingForFrameSync) QPlatformWindow::requestUpdate(); else mUpdateRequested = true; -- cgit v1.2.3