From 5da65155c92724ada9b52e66f96f42aaca845f8f Mon Sep 17 00:00:00 2001 From: Sungjoon Moon Date: Fri, 27 Feb 2026 23:51:32 +0900 Subject: [PATCH 1/2] Upgrade wlroots to v0.20 Breaking changes: - https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5230 --- .github/workflows/main.yml | 2 +- README.md | 2 +- cage.c | 4 ++-- meson.build | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 31693bf..c768e69 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ on: branches: [ master ] env: - WLROOTS_VERSION: 0.19 + WLROOTS_VERSION: 0.20.0-rc3 jobs: compile: diff --git a/README.md b/README.md index d285219..cad3d86 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ All releases are published on [GitHub](https://github.com/cage-kiosk/cage/releas You can build Cage with the [meson](https://mesonbuild.com/) build system. It requires wayland, wlroots, and xkbcommon to be installed. Optionally, install -scdoc for manual pages. Cage is currently based on branch 0.18 of wlroots. +scdoc for manual pages. Cage is currently based on branch 0.20 of wlroots. Simply execute the following steps to build Cage: diff --git a/cage.c b/cage.c index 7c3d89d..aabeecd 100644 --- a/cage.c +++ b/cage.c @@ -588,8 +588,8 @@ main(int argc, char *argv[]) struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor(xcursor_manager, DEFAULT_XCURSOR, 1); if (xcursor) { struct wlr_xcursor_image *image = xcursor->images[0]; - wlr_xwayland_set_cursor(xwayland, image->buffer, image->width * 4, image->width, image->height, - image->hotspot_x, image->hotspot_y); + wlr_xwayland_set_cursor(xwayland, wlr_xcursor_image_get_buffer(image), image->hotspot_x, + image->hotspot_y); } } #endif diff --git a/meson.build b/meson.build index f8ccd76..dc43be6 100644 --- a/meson.build +++ b/meson.build @@ -35,7 +35,7 @@ if is_freebsd ) endif -wlroots = dependency('wlroots-0.19', fallback: ['wlroots', 'wlroots']) +wlroots = dependency('wlroots-0.20', fallback: ['wlroots', 'wlroots']) wayland_protos = dependency('wayland-protocols', version: '>=1.14') wayland_server = dependency('wayland-server') xkbcommon = dependency('xkbcommon') From d07f58265a456997ef9717091d5aa6ccbad50cbf Mon Sep 17 00:00:00 2001 From: Sungjoon Moon Date: Fri, 27 Feb 2026 23:54:21 +0900 Subject: [PATCH 2/2] Drop xdg-shell protocol scanning wlroots 0.20 generates wayland-protocols headers internally, so wayland-scanner for xdg-shell is no longer needed. See: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5075 --- meson.build | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/meson.build b/meson.build index dc43be6..91ba7ec 100644 --- a/meson.build +++ b/meson.build @@ -36,34 +36,10 @@ if is_freebsd endif wlroots = dependency('wlroots-0.20', fallback: ['wlroots', 'wlroots']) -wayland_protos = dependency('wayland-protocols', version: '>=1.14') wayland_server = dependency('wayland-server') xkbcommon = dependency('xkbcommon') math = cc.find_library('m') -wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') -wayland_scanner = find_program('wayland-scanner') -wayland_scanner_server = generator( - wayland_scanner, - output: '@BASENAME@-protocol.h', - arguments: ['server-header', '@INPUT@', '@OUTPUT@'], -) - -server_protocols = [ - [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'], -] - -server_protos_headers = [] - -foreach p : server_protocols - xml = join_paths(p) - server_protos_headers += wayland_scanner_server.process(xml) -endforeach - -server_protos = declare_dependency( - sources: server_protos_headers, -) - have_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true' version = '@0@'.format(meson.project_version()) @@ -140,7 +116,6 @@ executable( meson.project_name(), cage_sources + cage_headers, dependencies: [ - server_protos, wayland_server, wlroots, xkbcommon,