Commit 85d6715b authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

wayland: Track already existing subsurfaces in SubSurfaceMonitor

When the monitor is created, the surface may already have child
sub-surfaces. The childSubSurfaceAdded signal won't be emitted for them,
we need to handle this case explicitly.

BUG: 433511
FIXED-IN: 5.21.2


(cherry picked from commit e1279e51)
parent 90d11738
......@@ -66,6 +66,11 @@ void SubSurfaceMonitor::registerSurface(SurfaceInterface *surface)
this, &SubSurfaceMonitor::registerSubSurface);
connect(surface, &SurfaceInterface::childSubSurfaceRemoved,
this, &SubSurfaceMonitor::unregisterSubSurface);
const QList<SubSurfaceInterface *> childSubSurfaces = surface->childSubSurfaces();
for (SubSurfaceInterface *childSubSurface : childSubSurfaces) {
registerSubSurface(childSubSurface);
}
}
void SubSurfaceMonitor::unregisterSurface(SurfaceInterface *surface)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment