diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 577619a7..64419afa 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); } } @@ -944,7 +948,7 @@ struct sway_node *seat_get_focus(struct sway_seat *seat) { if (!seat->has_focus) { return NULL; } - if (wl_list_length(&seat->focus_stack) == 0) { + if (wl_list_empty(&seat->focus_stack)) { return NULL; } struct sway_seat_node *current = |