Upgrade wlroots to v0.19
Some checks failed
Continuous integration build / compile (clang, alpine:edge, disabled) (push) Has been cancelled
Continuous integration build / compile (clang, alpine:edge, enabled) (push) Has been cancelled
Continuous integration build / compile (clang, archlinux:base-devel, disabled) (push) Has been cancelled
Continuous integration build / compile (clang, archlinux:base-devel, enabled) (push) Has been cancelled
Continuous integration build / scan-build (push) Has been cancelled
Continuous integration build / compile (gcc, alpine:edge, disabled) (push) Has been cancelled
Continuous integration build / compile (gcc, alpine:edge, enabled) (push) Has been cancelled
Continuous integration build / compile (gcc, archlinux:base-devel, disabled) (push) Has been cancelled
Continuous integration build / compile (gcc, archlinux:base-devel, enabled) (push) Has been cancelled
Continuous integration build / format (push) Has been cancelled

This commit is contained in:
Simon Ser 2025-04-10 17:50:15 +02:00
parent 6efb3b5042
commit 9ad44e4f52
6 changed files with 13 additions and 11 deletions

View file

@ -5,6 +5,9 @@ on:
pull_request: pull_request:
branches: [ master ] branches: [ master ]
env:
WLROOTS_VERSION: 0.19
jobs: jobs:
compile: compile:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -32,7 +35,7 @@ jobs:
pacman -Syu --noconfirm xcb-util-wm seatd git clang meson libinput libdrm mesa libxkbcommon wayland wayland-protocols xorg-server-xwayland scdoc pacman -Syu --noconfirm xcb-util-wm seatd git clang meson libinput libdrm mesa libxkbcommon wayland wayland-protocols xorg-server-xwayland scdoc
- name: Fetch wlroots as a subproject - name: Fetch wlroots as a subproject
run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b 0.18 run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION
- name: Compile Cage (XWayland=${{ matrix.xwayland }}) - name: Compile Cage (XWayland=${{ matrix.xwayland }})
run: | run: |
@ -52,7 +55,7 @@ jobs:
pacman-key --init pacman-key --init
pacman -Syu --noconfirm xcb-util-wm seatd git clang meson libinput libdrm mesa libxkbcommon wayland wayland-protocols xorg-server-xwayland scdoc hwdata pacman -Syu --noconfirm xcb-util-wm seatd git clang meson libinput libdrm mesa libxkbcommon wayland wayland-protocols xorg-server-xwayland scdoc hwdata
- name: Fetch wlroots as a subproject - name: Fetch wlroots as a subproject
run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b 0.18 run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION
- name: Check for formatting changes - name: Check for formatting changes
run: | run: |
meson build-clang-format -Dwlroots:xwayland=enabled meson build-clang-format -Dwlroots:xwayland=enabled
@ -71,7 +74,7 @@ jobs:
pacman-key --init pacman-key --init
pacman -Syu --noconfirm xcb-util-wm seatd git clang meson libinput libdrm mesa libxkbcommon wayland wayland-protocols xorg-server-xwayland scdoc hwdata pacman -Syu --noconfirm xcb-util-wm seatd git clang meson libinput libdrm mesa libxkbcommon wayland wayland-protocols xorg-server-xwayland scdoc hwdata
- name: Fetch wlroots as a subproject - name: Fetch wlroots as a subproject
run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b 0.18 run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION
- name: Run scan-build - name: Run scan-build
run: | run: |
meson build-scan-build -Dwlroots:xwayland=enabled meson build-scan-build -Dwlroots:xwayland=enabled

2
cage.c
View file

@ -454,7 +454,7 @@ main(int argc, char *argv[])
goto end; goto end;
} }
struct wlr_presentation *presentation = wlr_presentation_create(server.wl_display, server.backend); struct wlr_presentation *presentation = wlr_presentation_create(server.wl_display, server.backend, 2);
if (!presentation) { if (!presentation) {
wlr_log(WLR_ERROR, "Unable to create the presentation interface"); wlr_log(WLR_ERROR, "Unable to create the presentation interface");
ret = 1; ret = 1;

View file

@ -35,7 +35,7 @@ if is_freebsd
) )
endif endif
wlroots = dependency('wlroots-0.18', fallback: ['wlroots', 'wlroots']) wlroots = dependency('wlroots-0.19', fallback: ['wlroots', 'wlroots'])
wayland_protos = dependency('wayland-protocols', version: '>=1.14') wayland_protos = dependency('wayland-protocols', version: '>=1.14')
wayland_server = dependency('wayland-server') wayland_server = dependency('wayland-server')
xkbcommon = dependency('xkbcommon') xkbcommon = dependency('xkbcommon')

2
seat.c
View file

@ -937,7 +937,7 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view)
#if CAGE_HAS_XWAYLAND #if CAGE_HAS_XWAYLAND
if (view->type == CAGE_XWAYLAND_VIEW) { if (view->type == CAGE_XWAYLAND_VIEW) {
struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view); struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view);
if (!wlr_xwayland_or_surface_wants_focus(xwayland_view->xwayland_surface)) { if (!wlr_xwayland_surface_override_redirect_wants_focus(xwayland_view->xwayland_surface)) {
return; return;
} }
} }

View file

@ -128,11 +128,10 @@ static void
get_geometry(struct cg_view *view, int *width_out, int *height_out) get_geometry(struct cg_view *view, int *width_out, int *height_out)
{ {
struct cg_xdg_shell_view *xdg_shell_view = xdg_shell_view_from_view(view); struct cg_xdg_shell_view *xdg_shell_view = xdg_shell_view_from_view(view);
struct wlr_box geom; struct wlr_xdg_surface *xdg_surface = xdg_shell_view->xdg_toplevel->base;
wlr_xdg_surface_get_geometry(xdg_shell_view->xdg_toplevel->base, &geom); *width_out = xdg_surface->geometry.width;
*width_out = geom.width; *height_out = xdg_surface->geometry.height;
*height_out = geom.height;
} }
static bool static bool

View file

@ -92,7 +92,7 @@ maximize(struct cg_view *view, int output_width, int output_height)
struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view); struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view);
wlr_xwayland_surface_configure(xwayland_view->xwayland_surface, view->lx, view->ly, output_width, wlr_xwayland_surface_configure(xwayland_view->xwayland_surface, view->lx, view->ly, output_width,
output_height); output_height);
wlr_xwayland_surface_set_maximized(xwayland_view->xwayland_surface, true); wlr_xwayland_surface_set_maximized(xwayland_view->xwayland_surface, true, true);
} }
static void static void