xwayland: fix crash when request_fullscreen is called while unmapped
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 / 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
Continuous integration build / scan-build (push) Has been cancelled

Closes: https://github.com/cage-kiosk/cage/issues/463
This commit is contained in:
Simon Ser 2025-12-27 13:54:17 +01:00
parent 832e88b0c9
commit 73bf1c8bd6

View file

@ -116,8 +116,10 @@ handle_xwayland_surface_request_fullscreen(struct wl_listener *listener, void *d
struct cg_xwayland_view *xwayland_view = wl_container_of(listener, xwayland_view, request_fullscreen); struct cg_xwayland_view *xwayland_view = wl_container_of(listener, xwayland_view, request_fullscreen);
struct wlr_xwayland_surface *xwayland_surface = xwayland_view->xwayland_surface; struct wlr_xwayland_surface *xwayland_surface = xwayland_view->xwayland_surface;
wlr_xwayland_surface_set_fullscreen(xwayland_view->xwayland_surface, xwayland_surface->fullscreen); wlr_xwayland_surface_set_fullscreen(xwayland_view->xwayland_surface, xwayland_surface->fullscreen);
wlr_foreign_toplevel_handle_v1_set_fullscreen(xwayland_view->view.foreign_toplevel_handle, if (xwayland_view->view.foreign_toplevel_handle) {
xwayland_surface->fullscreen); wlr_foreign_toplevel_handle_v1_set_fullscreen(xwayland_view->view.foreign_toplevel_handle,
xwayland_surface->fullscreen);
}
} }
static void static void
@ -148,6 +150,8 @@ handle_xwayland_surface_map(struct wl_listener *listener, void *data)
if (xwayland_view->xwayland_surface->class) if (xwayland_view->xwayland_surface->class)
wlr_foreign_toplevel_handle_v1_set_app_id(view->foreign_toplevel_handle, wlr_foreign_toplevel_handle_v1_set_app_id(view->foreign_toplevel_handle,
xwayland_view->xwayland_surface->class); xwayland_view->xwayland_surface->class);
wlr_foreign_toplevel_handle_v1_set_fullscreen(view->foreign_toplevel_handle,
xwayland_view->xwayland_surface->fullscreen);
} }
static void static void