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:
parent
58495ad208
commit
e994fbf02c
1 changed files with 2 additions and 1 deletions
|
@ -958,10 +958,11 @@ locked_pointer_destroy (struct wl_client *client,
|
||||||
warp_x = (int) x;
|
warp_x = (int) x;
|
||||||
warp_y = (int) y;
|
warp_y = (int) y;
|
||||||
}
|
}
|
||||||
wl_resource_destroy (resource);
|
|
||||||
|
|
||||||
if (warp_pointer)
|
if (warp_pointer)
|
||||||
clutter_seat_warp_pointer (constraint->seat->clutter_seat, warp_x, warp_y);
|
clutter_seat_warp_pointer (constraint->seat->clutter_seat, warp_x, warp_y);
|
||||||
|
|
||||||
|
wl_resource_destroy (resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue