aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/input/seat.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index feb98cd4..502ed5ac 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -614,6 +614,13 @@ void seat_set_focus_warp(struct sway_seat *seat, struct sway_node *node,
614 new_output_last_ws = output_get_active_workspace(new_output); 614 new_output_last_ws = output_get_active_workspace(new_output);
615 } 615 }
616 616
617 // Unfocus the previous focus
618 if (last_focus) {
619 seat_send_unfocus(last_focus, seat);
620 node_set_dirty(last_focus);
621 node_set_dirty(node_get_parent(last_focus));
622 }
623
617 // Put the container parents on the focus stack, then the workspace, then 624 // Put the container parents on the focus stack, then the workspace, then
618 // the focused container. 625 // the focused container.
619 if (container) { 626 if (container) {
@@ -640,15 +647,6 @@ void seat_set_focus_warp(struct sway_seat *seat, struct sway_node *node,
640 wl_list_remove(&seat_node->link); 647 wl_list_remove(&seat_node->link);
641 wl_list_insert(&seat->focus_stack, &seat_node->link); 648 wl_list_insert(&seat->focus_stack, &seat_node->link);
642 node_set_dirty(&container->node); 649 node_set_dirty(&container->node);
643
644 if (last_focus) {
645 seat_send_unfocus(last_focus, seat);
646 node_set_dirty(last_focus);
647 struct sway_node *last_parent = node_get_parent(last_focus);
648 if (last_parent) {
649 node_set_dirty(last_parent);
650 }
651 }
652 seat_send_focus(&container->node, seat); 650 seat_send_focus(&container->node, seat);
653 } 651 }
654 652