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
This commit is contained in:
parent
73dd65f452
commit
e1279e516c
1 changed files with 5 additions and 0 deletions
|
@ -66,6 +66,11 @@ void SubSurfaceMonitor::registerSurface(SurfaceInterface *surface)
|
||||||
this, &SubSurfaceMonitor::registerSubSurface);
|
this, &SubSurfaceMonitor::registerSubSurface);
|
||||||
connect(surface, &SurfaceInterface::childSubSurfaceRemoved,
|
connect(surface, &SurfaceInterface::childSubSurfaceRemoved,
|
||||||
this, &SubSurfaceMonitor::unregisterSubSurface);
|
this, &SubSurfaceMonitor::unregisterSubSurface);
|
||||||
|
|
||||||
|
const QList<SubSurfaceInterface *> childSubSurfaces = surface->childSubSurfaces();
|
||||||
|
for (SubSurfaceInterface *childSubSurface : childSubSurfaces) {
|
||||||
|
registerSubSurface(childSubSurface);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubSurfaceMonitor::unregisterSurface(SurfaceInterface *surface)
|
void SubSurfaceMonitor::unregisterSurface(SurfaceInterface *surface)
|
||||||
|
|
Loading…
Reference in a new issue