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

@ -66,7 +66,7 @@ fn windowListener(river_window_v1: *river.WindowV1, event: river.WindowV1.Event,
}
}
window.link.remove();
window.context.allocator.destroy(window);
utils.allocator.destroy(window);
},
.dimensions => |ev| {
// The protocol requires these are strictly greather than zero.
@ -172,6 +172,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(.Window);