git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commita2bfc9867b6666ff12b88c77d6cbbc0d8953ba52
parenta6368c1134
authorIsaac Freund <[email protected]>
date2026-03-29 18:21
Server: implement wl_fixes

 build.zig.zon    | 4 ++--
 river/Server.zig | 7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/build.zig.zon b/build.zig.zon
index 44a6fc4..9030dd2 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -20,8 +20,8 @@
             .hash = "wayland-0.5.0-lQa1knz8AQCh08NA8BeQrwJB9U3CfqcVAdHZYGRKIGuu",
         },
         .wlroots = .{
-            .url = "git+https://codeberg.org/ifreund/zig-wlroots?ref=master#149c17476ccec90b9904d6a1a8d38858d4ac925f",
-            .hash = "wlroots-0.20.0-dev-jmOlckAeBACoYWj_Hs3JdREUrmKQDTj3d_P76C1HAHgz",
+            .url = "git+https://codeberg.org/ifreund/zig-wlroots?ref=master#22180881fd3f67b2449a34dd7dd978c3291ccc15",
+            .hash = "wlroots-0.20.0-dev-jmOlcu8pBACQUTdOlveX6Evwnm4BeqEANGGwgxR-pSHn",
         },
         .xkbcommon = .{
             .url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.4.0.tar.gz",
diff --git a/river/Server.zig b/river/Server.zig
index fc5845d..a24b849 100644
--- a/river/Server.zig
+++ b/river/Server.zig
@@ -40,6 +40,8 @@ wl_server: *wl.Server,
 sigint_source: *wl.EventSource,
 sigterm_source: *wl.EventSource,
 
+fixes: *wlr.Fixes,
+
 backend: *wlr.Backend,
 session: ?*wlr.Session,
 
@@ -120,6 +122,8 @@ pub fn init(server: *Server, runtime_xwayland: bool) !void {
         .sigint_source = try loop.addSignal(*wl.Server, posix.SIG.INT, terminate, wl_server),
         .sigterm_source = try loop.addSignal(*wl.Server, posix.SIG.TERM, terminate, wl_server),
 
+        .fixes = try wlr.Fixes.create(wl_server, 1),
+
         .backend = backend,
         .session = session,
         .renderer = renderer,
@@ -306,7 +310,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 == server.shm.global or
+    return global == server.fixes.global or
+        global == server.shm.global or
         global == server.single_pixel_buffer_manager.global or
         global == server.alpha_modifier.global or
         global == server.viewporter.global or