aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-12-28 23:57:34 -0500
committerFurkan Sahin <furkan-dev@proton.me>2018-12-28 23:57:34 -0500
commitcde8f2353354cceb0db30d879343557b76b288da (patch)
treeca60bdc856420faf46f552424c3838bcf779b6fe
parentb73a15bcf9445419e47d5d74c3e0a144052511f4 (diff)
parent8a9fe71b53e9458b54012975201cf422ad0d52d1 (diff)
Merge pull request #3345 from RyanDwyer/fix-scratchpad-crash
Fix crash when scratchpad contains split containers
-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) {
container_detach(con);
arrange_workspace(ws);
- if (&con->node == focus) {
+ if (&con->node == focus || node_has_ancestor(focus, &con->node)) {
seat_set_focus(seat, seat_get_focus_inactive(seat, &ws->node));
}
list_move_to_end(root->scratchpad, con);