implement the zmez_remote_lua_v1 protocol

This commit is contained in:
Squibid 2025-11-27 20:14:06 -05:00
parent ffec7db766
commit ffbe496599
Signed by: squibid
GPG key ID: BECE5684D3C4005D
4 changed files with 113 additions and 1 deletions

View file

@ -7,6 +7,7 @@ const xkb = @import("xkbcommon");
const wlr = @import("wlroots");
const zlua = @import("zlua");
const RemoteLua = @import("../RemoteLua.zig");
const Event = @import("events.zig");
const Lua = &@import("../main.zig").lua;
@ -38,6 +39,8 @@ pub fn callback(self: *const Hook, args: anytype) void {
i = k;
}
Lua.state.protectedCall(.{ .args = i }) catch { };
Lua.state.protectedCall(.{ .args = i }) catch {
RemoteLua.sendNewLogEntry(Lua.state.toString(-1) catch unreachable);
};
Lua.state.pop(-1);
}