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

@ -4,6 +4,8 @@ const std = @import("std");
const wlr = @import("wlroots");
const wl = @import("wayland").server.wl;
const Utils = @import("utils.zig");
const server = &@import("main.zig").server;
wlr_seat: *wlr.Seat,
@ -13,7 +15,9 @@ request_set_selection: wl.Listener(*wlr.Seat.event.RequestSetSelection) = .init(
// request_set_primary_selection
// request_start_drage
pub fn init(self: *Seat) !void {
pub fn init(self: *Seat) void {
errdefer Utils.oomPanic();
self.* = .{
.wlr_seat = try wlr.Seat.create(server.wl_server, "default"),
};