Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
Output: destroy layer surfaces on destroy
river/Output.zig | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/river/Output.zig b/river/Output.zig
index be05c07..61bab2f 100644
--- a/river/Output.zig
+++ b/river/Output.zig
@@ -207,6 +207,15 @@ fn handleDestroy(listener: *wl.Listener(*wlr.Output), wlr_output: *wlr.Output) v
log.debug("output '{s}' destroyed", .{wlr_output.name});
+ {
+ var it = server.layer_shell.surfaces.iterator();
+ while (it.next()) |surface| {
+ if (surface.wlr_layer_surface.output == wlr_output) {
+ surface.wlr_layer_surface.destroy();
+ }
+ }
+ }
+
output.link.remove();
output.destroy.link.remove();