[server] Flush client after sending a frameRendered callback

This commit is contained in:
Martin Gräßlin 2015-11-04 14:50:15 +01:00
parent df22d2ac31
commit 219b1b755c

View file

@ -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()