From 5f95b44ac64a62be71d672513261fc3ebaaed14f Mon Sep 17 00:00:00 2001 From: Squibid Date: Sat, 18 Oct 2025 20:56:26 -0400 Subject: [PATCH] get the server from the listener before using it --- src/output.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/output.zig b/src/output.zig index 63b1ac4..b87c60e 100644 --- a/src/output.zig +++ b/src/output.zig @@ -49,8 +49,10 @@ event: *wlr.Output.event.RequestState, } } -pub fn handleFrame(_: *wl.Listener(*wlr.Output), wlr_output: *wlr.Output) void { - const scene_output = server.scene.getSceneOutput(wlr_output); +pub fn handleFrame(listener: *wl.Listener(*wlr.Output), wlr_output: *wlr.Output) void { + const output: *Output = @fieldParentPtr("destroy", listener); + + const scene_output = output.*.server.scene.getSceneOutput(wlr_output); if(scene_output) |so| { std.log.info("Rendering commitin scene output\n", .{});