aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-26 16:02:11 +0200
committerGitHub <noreply@github.com>2018-10-26 16:02:11 +0200
commitb52e005346507d8999395b235009b67287b1b492 (patch)
tree3d1d95e2c99911bb815aed18ed582aa3095b3811 /sway/input/seat.c
parentb29beb1aa05431c5166afd4ef8d90c753fd9570a (diff)
parent63d076dc2abba0cab6fb78bb2e36088f0b4f9ae5 (diff)
Merge pull request #2989 from RyanDwyer/fix-focus-glitchiness
Fix focus after a non-visible workspace's last container is destroyed
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 577619a7..9d4dc7af 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -185,7 +185,11 @@ static void handle_seat_node_destroy(struct wl_listener *listener, void *data) {
seat_set_focus(seat, next_focus);
} else {
// Setting focus_inactive
+ focus = seat_get_focus_inactive(seat, &root->node);
seat_set_raw_focus(seat, next_focus);
+ if (focus->type == N_CONTAINER) {
+ seat_set_raw_focus(seat, &focus->sway_container->workspace->node);
+ }
seat_set_raw_focus(seat, focus);
}
}