Refactor initialization and Context struct

I tried to make it a little bit easier to follow and get rid of the
need to call back to context.x.y.z (as much) [I hope]
This commit is contained in:
Ben Buhse 2026-01-24 17:48:01 -06:00
commit 30231f1149
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
8 changed files with 187 additions and 118 deletions

View file

@ -30,7 +30,7 @@ fn outputListener(river_output_v1: *river.OutputV1, event: river.OutputV1.Event,
switch (event) {
.removed => {
river_output_v1.destroy();
output.context.allocator.destroy(output);
utils.allocator.destroy(output);
},
.wl_output => {
// log.debug("initializing new river_output_v1 corresponding to wl_output: {d}", .{ev.name});
@ -61,6 +61,7 @@ const wayland = @import("wayland");
const wl = wayland.client.wl;
const river = wayland.client.river;
const Context = @import("main.zig").Context;
const utils = @import("utils.zig");
const Context = @import("Context.zig");
const log = std.log.scoped(.Output);