layer-shell: ignore commits on closed layer surface
This commit is contained in:
parent
1baf3bf462
commit
1e18ac9d74
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
fn handleCommit(listener: *wl.Listener(*wlr.Surface), wlr_surface: *wlr.Surface) void {
|
||||||
const self = @fieldParentPtr(Self, "commit", listener);
|
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);
|
assert(self.wlr_layer_surface.output != null);
|
||||||
|
|
||||||
// If a surface is committed while it is not mapped, we may need to send a configure.
|
// If a surface is committed while it is not mapped, we may need to send a configure.
|
||||||
|
|
Loading…
Reference in a new issue