Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
Output: fix mode lifetime
Ensure we don't keep a pointer to an output mode owned by wlroots after
the wlr_output has been destroyed.
river/Output.zig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/river/Output.zig b/river/Output.zig
index d453df8..a69c9a4 100644
--- a/river/Output.zig
+++ b/river/Output.zig
@@ -230,6 +230,9 @@ fn handleDestroy(listener: *wl.Listener(*wlr.Output), wlr_output: *wlr.Output) v
output.wlr_output = null;
output.scene_output = null;
+ output.scheduled.mode = .none;
+ output.sent.mode = .none;
+ output.current.mode = .none;
output.scheduled.state = .destroying;
server.wm.dirtyWindowing();