From b67b3a6ec9a33c625a526e112cf32fbb86370c38 Mon Sep 17 00:00:00 2001 From: Harrison DiAmbrosio Date: Sat, 18 Oct 2025 20:51:15 -0400 Subject: [PATCH] hi zach --- src/output.zig | 13 +++++++++---- src/root.zig | 10 +++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/output.zig b/src/output.zig index 73ae2fe..915a551 100644 --- a/src/output.zig +++ b/src/output.zig @@ -31,11 +31,16 @@ pub const Output = struct { } pub fn handleFrame(_: *wl.Listener(*wlr.Output), wlr_output: *wlr.Output) void { - const scene_output = server.scene.getSceneOutput(wlr_output).?; - _ = scene_output.commit(null); + const scene_output = server.scene.getSceneOutput(wlr_output); + + if(scene_output) |so| { + std.log.info("Rendering commitin scene output\n", .{}); + _ = so.commit(null); + + var now = posix.clock_gettime(posix.CLOCK.MONOTONIC) catch @panic("CLOCK_MONOTONIC not supported"); + so.sendFrameDone(&now); + } - var now = posix.clock_gettime(posix.CLOCK.MONOTONIC) catch @panic("CLOCK_MONOTONIC not supported"); - scene_output.sendFrameDone(&now); } pub fn handleRequestState( diff --git a/src/root.zig b/src/root.zig index fd915d4..160a4cf 100644 --- a/src/root.zig +++ b/src/root.zig @@ -15,7 +15,7 @@ pub const Root = struct { new_output: wl.Listener(*wlr.Output), pub fn init(root: *Root) !void { - std.log.info("Creating root of mezzaluna", .{}); + std.log.info("Creating root of mezzaluna\n", .{}); const output_layout = try wlr.OutputLayout.create(server.wl_server); errdefer output_layout.destroy(); @@ -39,10 +39,10 @@ pub const Root = struct { return; }; - _ = self.scene.createSceneOutput(new_output.wlr_output) catch { - std.log.err("failed to create scene output for new output", .{}); - return; - }; + // _ = self.scene.createSceneOutput(new_output.wlr_output) catch { + // std.log.err("failed to create scene output for new output", .{}); + // return; + // }; } };