get the server from the listener before using it

This commit is contained in:
Squibid 2025-10-18 20:56:26 -04:00
parent 8cff29c795
commit 5f95b44ac6
Signed by: squibid
GPG key ID: BECE5684D3C4005D

View file

@ -49,8 +49,10 @@ event: *wlr.Output.event.RequestState,
} }
} }
pub fn handleFrame(_: *wl.Listener(*wlr.Output), wlr_output: *wlr.Output) void { pub fn handleFrame(listener: *wl.Listener(*wlr.Output), wlr_output: *wlr.Output) void {
const scene_output = server.scene.getSceneOutput(wlr_output); const output: *Output = @fieldParentPtr("destroy", listener);
const scene_output = output.*.server.scene.getSceneOutput(wlr_output);
if(scene_output) |so| { if(scene_output) |so| {
std.log.info("Rendering commitin scene output\n", .{}); std.log.info("Rendering commitin scene output\n", .{});