commit 418c19fe528190918d41aefed46abe02c8b6834f
parent 3952d4f4f3b76290101e0b82e7359d11e79058bb
Author: Brian Ashworth <bosrsf04@gmail.com>
Date: Sun, 10 Feb 2019 15:23:50 -0500
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.
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/sway/tree/view.c b/sway/tree/view.c
@@ -664,6 +664,13 @@ void view_unmap(struct sway_view *view) {
struct sway_seat *seat;
wl_list_for_each(seat, &server.input->seats, link) {
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);
}