From 219b1b755c84b6588035ef2ad7633a4c7e51d8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 4 Nov 2015 14:50:15 +0100 Subject: [PATCH] [server] Flush client after sending a frameRendered callback --- src/wayland/surface_interface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland/surface_interface.cpp b/src/wayland/surface_interface.cpp index 25516ddc48..d55cc3025f 100644 --- a/src/wayland/surface_interface.cpp +++ b/src/wayland/surface_interface.cpp @@ -173,11 +173,15 @@ void SurfaceInterface::frameRendered(quint32 msec) { Q_D(); // notify all callbacks + const bool needsFlush = !d->current.callbacks.isEmpty(); while (!d->current.callbacks.isEmpty()) { wl_resource *r = d->current.callbacks.takeFirst(); wl_callback_send_done(r, msec); wl_resource_destroy(r); } + if (needsFlush) { + client()->flush(); + } } void SurfaceInterface::Private::destroy()