diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-08-27 09:02:43 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-08-27 09:03:21 +0200 |
| commit | 8a7392dea729d3ed49a8bf8eee25906c4fd616ac (patch) | |
| tree | 09e0b2fa96c60a2e0c8b0cae9e631bd2dc66f52f /src/event-set.zig | |
| parent | c217e7ec5cddfc002c4582fb5d52727aee843a7d (diff) | |
Add ancillary data mechanism to send fds to compositor.
Currently we are just attaching the fds to the object id.
In theory this is not a valid implementation, since if we
have more than MAX_FD file descriptors this will not work.
But since this wont be the case in basically all cases of
the wayland protocol, we can just ignore that for now.
Diffstat (limited to 'src/event-set.zig')
| -rw-r--r-- | src/event-set.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/event-set.zig b/src/event-set.zig index 27c28bf..da17734 100644 --- a/src/event-set.zig +++ b/src/event-set.zig @@ -3,7 +3,7 @@ const wayland = @import("root.zig"); pub fn EventSet(T: type, events: anytype) type { return struct { - pub fn on_event(ptr: *anyopaque, ctx: *wayland.Context, opcode: u16, args: []const u8) void { + pub fn on_event(ptr: *anyopaque, ctx: *const wayland.Context, opcode: u16, args: []const u8) void { var offset: usize = 0; inline for (events, 0..) |event, index| { if (@TypeOf(event) != @TypeOf(null) and index == opcode) { @@ -66,7 +66,7 @@ test { a: u32 = 0, b: u32 = 0, - pub fn something(self: *@This(), _: *wayland.Context, a: u32, b: u32) void { + pub fn something(self: *@This(), _: *const wayland.Context, a: u32, b: u32) void { self.a = a; self.b = b; } |