Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
LayerShellOutput: reset state on object destroy
This ensures that subsequent window managers get sent non_exclusive_area
immediately for example.
river/LayerShellOutput.zig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/river/LayerShellOutput.zig b/river/LayerShellOutput.zig
index ea09f54..360c817 100644
--- a/river/LayerShellOutput.zig
+++ b/river/LayerShellOutput.zig
@@ -50,8 +50,7 @@ pub fn createObject(
pub fn makeInert(shell_output: *LayerShellOutput) void {
if (shell_output.object) |object| {
object.setHandler(?*anyopaque, handleRequestInert, null, null);
- shell_output.object = null;
- shell_output.sent = .{};
+ handleDestroy(object, shell_output);
}
}
@@ -65,6 +64,8 @@ fn handleRequestInert(
fn handleDestroy(_: *river.LayerShellOutputV1, shell_output: *LayerShellOutput) void {
shell_output.object = null;
+ shell_output.sent = .{};
+ shell_output.requested = .{};
}
fn handleRequest(