cleaning up code, adding support for workspaces, and handling errors

This commit is contained in:
Harrison DiAmbrosio 2025-10-22 23:40:19 -04:00
parent 6bfebb0e37
commit 609ee42d66
10 changed files with 204 additions and 137 deletions

View file

@ -1,11 +1,11 @@
const Seat = @This();
const std = @import("std");
const server = &@import("main.zig").server;
const wlr = @import("wlroots");
const wl = @import("wayland").server.wl;
const server = &@import("main.zig").server;
wlr_seat: *wlr.Seat,
request_set_cursor: wl.Listener(*wlr.Seat.event.RequestSetCursor) = .init(handleRequestSetCursor),
@ -23,10 +23,10 @@ pub fn init(self: *Seat) !void {
}
pub fn deinit(self: *Seat) void {
self.wlr_seat.destroy();
self.request_set_cursor.link.remove();
self.request_set_selection.link.remove();
self.wlr_seat.destroy();
}
fn handleRequestSetCursor(