From e575485f0daa9f0f5b58ad1477ed806c3c42444d Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 23 Dec 2024 14:14:35 -0600 Subject: [PATCH] deps: upgrade to latest zig-wayland --- build.zig | 7 ------- build.zig.zon | 4 ++-- river/Server.zig | 4 ++-- riverctl/main.zig | 4 ++-- rivertile/main.zig | 4 ++-- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/build.zig b/build.zig index 12f02d7..9d1f4fa 100644 --- a/build.zig +++ b/build.zig @@ -185,9 +185,6 @@ pub fn build(b: *Build) !void { .flags = &.{ "-std=c99", "-O2" }, }); - // TODO: remove when zig issue #131 is implemented - scanner.addCSource(river); - river.pie = pie; river.root_module.omit_frame_pointer = omit_frame_pointer; @@ -211,8 +208,6 @@ pub fn build(b: *Build) !void { riverctl.linkLibC(); riverctl.linkSystemLibrary("wayland-client"); - scanner.addCSource(riverctl); - riverctl.pie = pie; riverctl.root_module.omit_frame_pointer = omit_frame_pointer; @@ -236,8 +231,6 @@ pub fn build(b: *Build) !void { rivertile.linkLibC(); rivertile.linkSystemLibrary("wayland-client"); - scanner.addCSource(rivertile); - rivertile.pie = pie; rivertile.root_module.omit_frame_pointer = omit_frame_pointer; diff --git a/build.zig.zon b/build.zig.zon index d5aed98..55ab6dc 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -8,8 +8,8 @@ .hash = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56", }, .@"zig-wayland" = .{ - .url = "https://codeberg.org/ifreund/zig-wayland/archive/4761e625bcc8218650625edc4734710b29a9ff0b.tar.gz", - .hash = "1220e1b6f822bda107aa1e3eca277ac82e0d833ba3182cd6f6ec56521046dc37cccc", + .url = "https://codeberg.org/ifreund/zig-wayland/archive/bd8afd256fb6beed7d72e3580b00f33dea7155a1.tar.gz", + .hash = "1220218a0e5c2cd63a2311417f4d3f2411dd17d75815f67c704ee657bd846ecbc3e0", }, .@"zig-wlroots" = .{ .url = "https://codeberg.org/ifreund/zig-wlroots/archive/afbbbbe5579c750feed8de12b073fa50b0651137.tar.gz", diff --git a/river/Server.zig b/river/Server.zig index 027e777..401689a 100644 --- a/river/Server.zig +++ b/river/Server.zig @@ -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 // should catch river accidentally exposing multiple copies of e.g. wl_shm // with an assertion failure. - return global.getInterface() == wl.Output.getInterface() or - global.getInterface() == wl.Seat.getInterface() or + return global.getInterface() == wl.Output.interface or + global.getInterface() == wl.Seat.interface or global == server.shm.global or global == server.single_pixel_buffer_manager.global or global == server.viewporter.global or diff --git a/riverctl/main.zig b/riverctl/main.zig index 13a36ae..06d083b 100644 --- a/riverctl/main.zig +++ b/riverctl/main.zig @@ -110,10 +110,10 @@ fn _main() !void { fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, globals: *Globals) void { switch (event) { .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 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"); } }, diff --git a/rivertile/main.zig b/rivertile/main.zig index 2590e7e..10dc6cc 100644 --- a/rivertile/main.zig +++ b/rivertile/main.zig @@ -382,9 +382,9 @@ pub fn main() !void { fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, context: *Context) void { switch (event) { .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; - } 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}); } },