diff options
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index bdd5f830..4b9bbfd0 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -637,7 +637,16 @@ void view_unmap(struct sway_view *view) { | |||
637 | 637 | ||
638 | struct sway_seat *seat; | 638 | struct sway_seat *seat; |
639 | wl_list_for_each(seat, &input_manager->seats, link) { | 639 | wl_list_for_each(seat, &input_manager->seats, link) { |
640 | cursor_send_pointer_motion(seat->cursor, 0, true); | 640 | if (config->mouse_warping == WARP_CONTAINER) { |
641 | struct sway_node *node = seat_get_focus(seat); | ||
642 | if (node && node->type == N_CONTAINER) { | ||
643 | cursor_warp_to_container(seat->cursor, node->sway_container); | ||
644 | } else if (node && node->type == N_WORKSPACE) { | ||
645 | cursor_warp_to_workspace(seat->cursor, node->sway_workspace); | ||
646 | } | ||
647 | } else { | ||
648 | cursor_send_pointer_motion(seat->cursor, 0, true); | ||
649 | } | ||
641 | } | 650 | } |
642 | 651 | ||
643 | transaction_commit_dirty(); | 652 | transaction_commit_dirty(); |