Merge branch 'mez_remote_lua' into dev

This commit is contained in:
Squibid 2025-12-10 20:19:42 -05:00
commit 1f2e333846
Signed by: squibid
GPG key ID: BECE5684D3C4005D
7 changed files with 293 additions and 39 deletions

View file

@ -16,6 +16,8 @@ const Keymap = @import("types/Keymap.zig");
const Hook = @import("types/Hook.zig");
const Events = @import("types/Events.zig");
const Popup = @import("Popup.zig");
const RemoteLua = @import("RemoteLua.zig");
const RemoteLuaManager = @import("RemoteLuaManager.zig");
const gpa = std.heap.c_allocator;
const server = &@import("main.zig").server;
@ -26,6 +28,7 @@ renderer: *wlr.Renderer,
backend: *wlr.Backend,
event_loop: *wl.EventLoop,
session: ?*wlr.Session,
remote_lua_manager: ?*RemoteLuaManager,
shm: *wlr.Shm,
xdg_shell: *wlr.XdgShell,
@ -44,6 +47,7 @@ cursor: Cursor,
keymaps: std.AutoHashMap(u64, Keymap),
hooks: std.ArrayList(*Hook),
events: Events,
remote_lua_clients: std.DoublyLinkedList,
// Backend listeners
new_input: wl.Listener(*wlr.InputDevice) = .init(handleNewInput),
@ -98,9 +102,11 @@ pub fn init(self: *Server) void {
.root = undefined,
.seat = undefined,
.cursor = undefined,
.remote_lua_manager = RemoteLuaManager.init() catch Utils.oomPanic(),
.keymaps = .init(gpa),
.hooks = try .initCapacity(gpa, 10), // TODO: choose how many slots to start with
.events = try .init(gpa),
.remote_lua_clients = .{},
};
self.renderer.initServer(wl_server) catch {