mirror of
https://github.com/swaywm/sway.git
synced 2024-11-11 04:54:14 +01:00
view: remove pointer constraints on unmap
If the view has any pointer constraints, ensure they are removed before the view is unmapped and the surface is no longer tied to the view.
This commit is contained in:
parent
062da8eae7
commit
4e27785980
@ -664,6 +664,13 @@ void view_unmap(struct sway_view *view) {
|
|||||||
struct sway_seat *seat;
|
struct sway_seat *seat;
|
||||||
wl_list_for_each(seat, &server.input->seats, link) {
|
wl_list_for_each(seat, &server.input->seats, link) {
|
||||||
seat->cursor->image_surface = NULL;
|
seat->cursor->image_surface = NULL;
|
||||||
|
if (seat->cursor->active_constraint) {
|
||||||
|
struct wlr_surface *constrain_surface =
|
||||||
|
seat->cursor->active_constraint->surface;
|
||||||
|
if (view_from_wlr_surface(constrain_surface) == view) {
|
||||||
|
sway_cursor_constrain(seat->cursor, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
seat_consider_warp_to_focus(seat);
|
seat_consider_warp_to_focus(seat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user