Server: implement wl_fixes

This commit is contained in:
Isaac Freund
2026-03-29 18:26:21 +02:00
parent f1230e8ec9
commit 94463c4de2
2 changed files with 8 additions and 3 deletions

View File

@@ -17,8 +17,8 @@
.hash = "wayland-0.4.0-lQa1khbMAQAsLS2eBR7M5lofyEGPIbu2iFDmoz8lPC27",
},
.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.3.0.tar.gz",

View File

@@ -52,6 +52,8 @@ wl_server: *wl.Server,
sigint_source: *wl.EventSource,
sigterm_source: *wl.EventSource,
fixes: *wlr.Fixes,
backend: *wlr.Backend,
session: ?*wlr.Session,
@@ -137,6 +139,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,
@@ -320,7 +324,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.viewporter.global or
global == server.fractional_scale_manager.global or