1
0
Fork 0

wayland/pointer-constraints: Warp pointer before destroying resource

We're retrieving the context from the constraint instance, and the
wl_resource_destroy() call indirectly destroys the instance, so warp
earlier to still have a valid instance while warping.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3649
Fixes: 6a694d64f4 ("wayland/seat: Keep a back pointer to the ClutterSeat")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4003>
This commit is contained in:
Jonas Ådahl 2024-09-03 22:46:28 +02:00 committed by Marge Bot
parent 58495ad208
commit e994fbf02c

View file

@ -958,10 +958,11 @@ locked_pointer_destroy (struct wl_client *client,
warp_x = (int) x;
warp_y = (int) y;
}
wl_resource_destroy (resource);
if (warp_pointer)
clutter_seat_warp_pointer (constraint->seat->clutter_seat, warp_x, warp_y);
wl_resource_destroy (resource);
}
static void