deps: upgrade to latest zig-wayland

This commit is contained in:
Isaac Freund 2024-12-23 14:14:35 -06:00
parent 4fba7505f3
commit e575485f0d
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11
5 changed files with 8 additions and 15 deletions

View File

@ -185,9 +185,6 @@ pub fn build(b: *Build) !void {
.flags = &.{ "-std=c99", "-O2" }, .flags = &.{ "-std=c99", "-O2" },
}); });
// TODO: remove when zig issue #131 is implemented
scanner.addCSource(river);
river.pie = pie; river.pie = pie;
river.root_module.omit_frame_pointer = omit_frame_pointer; river.root_module.omit_frame_pointer = omit_frame_pointer;
@ -211,8 +208,6 @@ pub fn build(b: *Build) !void {
riverctl.linkLibC(); riverctl.linkLibC();
riverctl.linkSystemLibrary("wayland-client"); riverctl.linkSystemLibrary("wayland-client");
scanner.addCSource(riverctl);
riverctl.pie = pie; riverctl.pie = pie;
riverctl.root_module.omit_frame_pointer = omit_frame_pointer; riverctl.root_module.omit_frame_pointer = omit_frame_pointer;
@ -236,8 +231,6 @@ pub fn build(b: *Build) !void {
rivertile.linkLibC(); rivertile.linkLibC();
rivertile.linkSystemLibrary("wayland-client"); rivertile.linkSystemLibrary("wayland-client");
scanner.addCSource(rivertile);
rivertile.pie = pie; rivertile.pie = pie;
rivertile.root_module.omit_frame_pointer = omit_frame_pointer; rivertile.root_module.omit_frame_pointer = omit_frame_pointer;

View File

@ -8,8 +8,8 @@
.hash = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56", .hash = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56",
}, },
.@"zig-wayland" = .{ .@"zig-wayland" = .{
.url = "https://codeberg.org/ifreund/zig-wayland/archive/4761e625bcc8218650625edc4734710b29a9ff0b.tar.gz", .url = "https://codeberg.org/ifreund/zig-wayland/archive/bd8afd256fb6beed7d72e3580b00f33dea7155a1.tar.gz",
.hash = "1220e1b6f822bda107aa1e3eca277ac82e0d833ba3182cd6f6ec56521046dc37cccc", .hash = "1220218a0e5c2cd63a2311417f4d3f2411dd17d75815f67c704ee657bd846ecbc3e0",
}, },
.@"zig-wlroots" = .{ .@"zig-wlroots" = .{
.url = "https://codeberg.org/ifreund/zig-wlroots/archive/afbbbbe5579c750feed8de12b073fa50b0651137.tar.gz", .url = "https://codeberg.org/ifreund/zig-wlroots/archive/afbbbbe5579c750feed8de12b073fa50b0651137.tar.gz",

View File

@ -303,8 +303,8 @@ fn allowlist(server: *Server, global: *const wl.Global) bool {
// For other globals I like the current pointer comparison approach as it // For other globals I like the current pointer comparison approach as it
// should catch river accidentally exposing multiple copies of e.g. wl_shm // should catch river accidentally exposing multiple copies of e.g. wl_shm
// with an assertion failure. // with an assertion failure.
return global.getInterface() == wl.Output.getInterface() or return global.getInterface() == wl.Output.interface or
global.getInterface() == wl.Seat.getInterface() or global.getInterface() == wl.Seat.interface or
global == server.shm.global or global == server.shm.global or
global == server.single_pixel_buffer_manager.global or global == server.single_pixel_buffer_manager.global or
global == server.viewporter.global or global == server.viewporter.global or

View File

@ -110,10 +110,10 @@ fn _main() !void {
fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, globals: *Globals) void { fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, globals: *Globals) void {
switch (event) { switch (event) {
.global => |global| { .global => |global| {
if (mem.orderZ(u8, global.interface, wl.Seat.getInterface().name) == .eq) { if (mem.orderZ(u8, global.interface, wl.Seat.interface.name) == .eq) {
assert(globals.seat == null); // TODO: support multiple seats assert(globals.seat == null); // TODO: support multiple seats
globals.seat = registry.bind(global.name, wl.Seat, 1) catch @panic("out of memory"); globals.seat = registry.bind(global.name, wl.Seat, 1) catch @panic("out of memory");
} else if (mem.orderZ(u8, global.interface, zriver.ControlV1.getInterface().name) == .eq) { } else if (mem.orderZ(u8, global.interface, zriver.ControlV1.interface.name) == .eq) {
globals.control = registry.bind(global.name, zriver.ControlV1, 1) catch @panic("out of memory"); globals.control = registry.bind(global.name, zriver.ControlV1, 1) catch @panic("out of memory");
} }
}, },

View File

@ -382,9 +382,9 @@ pub fn main() !void {
fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, context: *Context) void { fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, context: *Context) void {
switch (event) { switch (event) {
.global => |global| { .global => |global| {
if (mem.orderZ(u8, global.interface, river.LayoutManagerV3.getInterface().name) == .eq) { if (mem.orderZ(u8, global.interface, river.LayoutManagerV3.interface.name) == .eq) {
context.layout_manager = registry.bind(global.name, river.LayoutManagerV3, 1) catch return; context.layout_manager = registry.bind(global.name, river.LayoutManagerV3, 1) catch return;
} else if (mem.orderZ(u8, global.interface, wl.Output.getInterface().name) == .eq) { } else if (mem.orderZ(u8, global.interface, wl.Output.interface.name) == .eq) {
context.addOutput(registry, global.name) catch |err| fatal("failed to bind output: {}", .{err}); context.addOutput(registry, global.name) catch |err| fatal("failed to bind output: {}", .{err});
} }
}, },