From d4dc5f357353ca30e1a109983fa81d1231cf42e3 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 8 Jan 2018 13:30:51 +0100 Subject: [PATCH] Fix requestUpdate() After commit 027a7131543b0194a7d9e98a6b53928e30bc080f, 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/plugins/platforms/wayland/qwaylandwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 6d7c0885c80..d9870810049 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/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;