Merge pull request #3345 from RyanDwyer/fix-scratchpad-crash

Fix crash when scratchpad contains split containers
This commit is contained in:
Brian Ashworth 2018-12-28 23:57:34 -05:00 committed by GitHub
commit f50d161574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);