git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitcea2e8d531ecf82f75ef6c9b5ea635f0e209bf4b
parentec6ae7331c
authorIsaac Freund <[email protected]>
date2021-08-12 21:18
layer-shell: ignore commits on closed layer surface

 river/LayerSurface.zig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/river/LayerSurface.zig b/river/LayerSurface.zig
index 68f2dc8..37f2c69 100644
--- a/river/LayerSurface.zig
+++ b/river/LayerSurface.zig
@@ -139,6 +139,9 @@ fn handleUnmap(listener: *wl.Listener(*wlr.LayerSurfaceV1), wlr_layer_surface: *
 fn handleCommit(listener: *wl.Listener(*wlr.Surface), wlr_surface: *wlr.Surface) void {
     const self = @fieldParentPtr(Self, "commit", listener);
 
+    // Ignore commits if the surface has been closed.
+    if (self.wlr_layer_surface.closed) return;
+
     assert(self.wlr_layer_surface.output != null);
 
     // If a surface is committed while it is not mapped, we may need to send a configure.