From 90aee02b705c53c5a1b842f99da5d2da75ee40d2 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Wed, 22 Dec 2021 05:30:20 +0000 Subject: [PATCH] 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. --- river/Subsurface.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/river/Subsurface.zig b/river/Subsurface.zig index 92328f5..edbd80f 100644 --- a/river/Subsurface.zig +++ b/river/Subsurface.zig @@ -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); }