aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/input/seat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 53fb2ed7..1dd99cb2 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -159,6 +159,14 @@ static void handle_seat_node_destroy(struct wl_listener *listener, void *data) {
159 return; 159 return;
160 } 160 }
161 161
162 if (node->type == N_CONTAINER &&
163 !workspace_is_visible(node->sway_container->workspace)) {
164 // Do not change the focus stack on a non-visible workspace. The focus
165 // will either be set when the workspace becomes visible or the
166 // workspace is now empty and will be destroyed
167 return;
168 }
169
162 // Find new focus_inactive (ie. sibling, or workspace if no siblings left) 170 // Find new focus_inactive (ie. sibling, or workspace if no siblings left)
163 struct sway_node *next_focus = NULL; 171 struct sway_node *next_focus = NULL;
164 while (next_focus == NULL) { 172 while (next_focus == NULL) {