launcher: use wlroots api to manipulate the token seat

It isn't safe to manipulate the seat field directly, as the seat may be
destroyed.

Ref: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4539
This commit is contained in:
Ronan Pigott 2024-02-06 16:10:52 -07:00
parent 93d391651c
commit 0f5812affc

View file

@ -238,7 +238,7 @@ struct launcher_ctx *launcher_ctx_create_internal(void) {
struct wlr_xdg_activation_token_v1 *token =
wlr_xdg_activation_token_v1_create(server.xdg_activation_v1);
token->seat = seat->wlr_seat;
wlr_xdg_activation_token_v1_set_seat(token, seat->wlr_seat);
struct launcher_ctx *ctx = launcher_ctx_create(token, &ws->node);
if (!ctx) {