Subsurface: add commit listener on create if mapped
Subsurfaces may already be mapped when create is called, in which case we must add the commit listener.
This commit is contained in:
parent
334ede00e1
commit
90aee02b70
@ -74,6 +74,8 @@ pub fn create(wlr_subsurface: *wlr.Subsurface, parent: Parent) void {
|
||||
wlr_subsurface.events.unmap.add(&subsurface.unmap);
|
||||
wlr_subsurface.surface.events.new_subsurface.add(&subsurface.new_subsurface);
|
||||
|
||||
if (wlr_subsurface.mapped) wlr_subsurface.surface.events.commit.add(&subsurface.commit);
|
||||
|
||||
Subsurface.handleExisting(wlr_subsurface.surface, parent);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user