more error handling and oranization

This commit is contained in:
Harrison DiAmbrosio 2025-10-23 13:30:59 -04:00
parent 609ee42d66
commit b328c0a7c7
8 changed files with 81 additions and 51 deletions

View file

@ -5,6 +5,7 @@ const wl = @import("wayland").server.wl;
const wlr = @import("wlroots");
const View = @import("view.zig");
const Utils = @import("utils.zig");
const server = &@import("main.zig").server;
@ -26,7 +27,9 @@ grab_y: f64 = 0,
grab_box: wlr.Box = undefined,
resize_edges: wlr.Edges = .{},
pub fn init(self: *Cursor) !void {
pub fn init(self: *Cursor) void {
errdefer Utils.oomPanic();
self.* = .{
.wlr_cursor = try wlr.Cursor.create(),
.x_cursor_manager = try wlr.XcursorManager.create(null, 24),