aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/root.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/root.c')
-rw-r--r--sway/tree/root.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/root.c b/sway/tree/root.c
index 22c46aba..e1624863 100644
--- a/sway/tree/root.c
+++ b/sway/tree/root.c
@@ -145,7 +145,7 @@ void root_scratchpad_hide(struct sway_container *con) {
145 145
146 container_detach(con); 146 container_detach(con);
147 arrange_workspace(ws); 147 arrange_workspace(ws);
148 if (&con->node == focus) { 148 if (&con->node == focus || node_has_ancestor(focus, &con->node)) {
149 seat_set_focus(seat, seat_get_focus_inactive(seat, &ws->node)); 149 seat_set_focus(seat, seat_get_focus_inactive(seat, &ws->node));
150 } 150 }
151 list_move_to_end(root->scratchpad, con); 151 list_move_to_end(root->scratchpad, con);