Skip to content

Commit

Permalink
layer-shell: ignore commits on closed layer surface
Browse files Browse the repository at this point in the history
  • Loading branch information
ifreund committed Aug 12, 2021
1 parent 1baf3bf commit 1e18ac9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions river/LayerSurface.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1e18ac9

Please sign in to comment.