[server] Send frameRendered to all sub-surfaces

If a surface got rendered it implies that all sub-surfaces also got
rendered. So pass the frameRendered to the complete sub-surface tree.
This commit is contained in:
Martin Gräßlin 2016-03-18 09:13:27 +01:00
parent 598896987b
commit 05993458e2

View file

@ -179,6 +179,13 @@ void SurfaceInterface::frameRendered(quint32 msec)
wl_callback_send_done(r, msec);
wl_resource_destroy(r);
}
for (auto it = d->current.children.constBegin(); it != d->current.children.constEnd(); ++it) {
const auto &subSurface = *it;
if (subSurface.isNull() || subSurface->d_func()->surface.isNull()) {
continue;
}
subSurface->d_func()->surface->frameRendered(msec);
}
if (needsFlush) {
client()->flush();
}