diff options
author | Brian Ashworth <RedSoxFan@users.noreply.github.com> | 2018-12-28 23:57:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-28 23:57:34 -0500 |
commit | f50d1615748d6169da773ed8bd4679eac87f0f99 (patch) | |
tree | ca60bdc856420faf46f552424c3838bcf779b6fe | |
parent | added fullscreen_mode to get_tree output (diff) | |
parent | Fix crash when scratchpad contains split containers (diff) | |
download | sway-f50d1615748d6169da773ed8bd4679eac87f0f99.tar.gz sway-f50d1615748d6169da773ed8bd4679eac87f0f99.tar.zst sway-f50d1615748d6169da773ed8bd4679eac87f0f99.zip |
Merge pull request #3345 from RyanDwyer/fix-scratchpad-crash
Fix crash when scratchpad contains split containers
-rw-r--r-- | sway/tree/root.c | 2 |
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); |