aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Rouven Czerwinski <rouven@czerwinskis.de>2019-01-07 13:21:02 +0100
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-07 10:30:19 -0500
commit0b18560952c8615b945ab62ee365b95fede647cc (patch)
tree312ca52e0cef2143ab21a0ce9f5beecf64760cc9 /sway/tree/view.c
parentcursor: move unhide and timeout retrieval into separate functions (diff)
downloadsway-0b18560952c8615b945ab62ee365b95fede647cc.tar.gz
sway-0b18560952c8615b945ab62ee365b95fede647cc.tar.zst
sway-0b18560952c8615b945ab62ee365b95fede647cc.zip
view: use seat_consider_warp_to_focus in view_unmap
The view_unmap function contained an open coded version of seat_consider_warp_to_focus, replace it with a call to the function.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index deb20676..28728420 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -654,14 +654,7 @@ void view_unmap(struct sway_view *view) {
654 654
655 struct sway_seat *seat; 655 struct sway_seat *seat;
656 wl_list_for_each(seat, &server.input->seats, link) { 656 wl_list_for_each(seat, &server.input->seats, link) {
657 if (config->mouse_warping == WARP_CONTAINER) { 657 seat_consider_warp_to_focus(seat);
658 struct sway_node *node = seat_get_focus(seat);
659 if (node && node->type == N_CONTAINER) {
660 cursor_warp_to_container(seat->cursor, node->sway_container);
661 } else if (node && node->type == N_WORKSPACE) {
662 cursor_warp_to_workspace(seat->cursor, node->sway_workspace);
663 }
664 }
665 } 658 }
666 659
667 transaction_commit_dirty(); 660 transaction_commit_dirty();