From e1279e516c009911eefedd4a6e4e84be926ba051 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 24 Feb 2021 10:21:44 +0200 Subject: [PATCH] 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 --- src/subsurfacemonitor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/subsurfacemonitor.cpp b/src/subsurfacemonitor.cpp index e67976bc8e..e45c684b38 100644 --- a/src/subsurfacemonitor.cpp +++ b/src/subsurfacemonitor.cpp @@ -66,6 +66,11 @@ void SubSurfaceMonitor::registerSurface(SurfaceInterface *surface) this, &SubSurfaceMonitor::registerSubSurface); connect(surface, &SurfaceInterface::childSubSurfaceRemoved, this, &SubSurfaceMonitor::unregisterSubSurface); + + const QList childSubSurfaces = surface->childSubSurfaces(); + for (SubSurfaceInterface *childSubSurface : childSubSurfaces) { + registerSubSurface(childSubSurface); + } } void SubSurfaceMonitor::unregisterSurface(SurfaceInterface *surface)