render: track subsurfaces created before role assignment
This commit is contained in:
@ -69,6 +69,11 @@ pub fn init(self: *Self, output: *Output, wlr_layer_surface: *wlr.LayerSurfaceV1
|
||||
wlr_layer_surface.events.unmap.add(&self.unmap);
|
||||
wlr_layer_surface.events.new_popup.add(&self.new_popup);
|
||||
wlr_layer_surface.surface.events.new_subsurface.add(&self.new_subsurface);
|
||||
|
||||
// There may already be subsurfaces present on this surface that we
|
||||
// aren't aware of and won't receive a new_subsurface event for.
|
||||
var it = wlr_layer_surface.surface.subsurfaces.iterator(.forward);
|
||||
while (it.next()) |s| Subsurface.create(s, .{ .layer_surface = self });
|
||||
}
|
||||
|
||||
fn handleDestroy(listener: *wl.Listener(*wlr.LayerSurfaceV1), wlr_layer_surface: *wlr.LayerSurfaceV1) void {
|
||||
|
||||
Reference in New Issue
Block a user