diff options
-rw-r--r-- | sway/tree/workspace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index b357d83d..d7650560 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c | |||
@@ -624,7 +624,10 @@ void workspace_add_gaps(struct sway_workspace *ws) { | |||
624 | if (config->smart_gaps) { | 624 | if (config->smart_gaps) { |
625 | struct sway_seat *seat = input_manager_get_default_seat(input_manager); | 625 | struct sway_seat *seat = input_manager_get_default_seat(input_manager); |
626 | struct sway_container *focus = | 626 | struct sway_container *focus = |
627 | seat_get_focus_inactive_view(seat, &ws->node); | 627 | seat_get_focus_inactive_tiling(seat, ws); |
628 | if (focus && !focus->view) { | ||
629 | focus = seat_get_focus_inactive_view(seat, &focus->node); | ||
630 | } | ||
628 | if (focus && focus->view && view_is_only_visible(focus->view)) { | 631 | if (focus && focus->view && view_is_only_visible(focus->view)) { |
629 | return; | 632 | return; |
630 | } | 633 | } |