aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index 9dd5c815..e9e5dfa2 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -640,11 +640,17 @@ void workspace_add_gaps(struct sway_workspace *ws) {
640 if (ws->current_gaps > 0) { 640 if (ws->current_gaps > 0) {
641 return; 641 return;
642 } 642 }
643 bool should_apply = 643 if (!config->edge_gaps) {
644 config->edge_gaps || (config->smart_gaps && ws->tiling->length > 1);
645 if (!should_apply) {
646 return; 644 return;
647 } 645 }
646 if (config->smart_gaps) {
647 struct sway_seat *seat = input_manager_get_default_seat(input_manager);
648 struct sway_container *focus =
649 seat_get_focus_inactive_view(seat, &ws->node);
650 if (focus && focus->view && view_is_only_visible(focus->view)) {
651 return;
652 }
653 }
648 654
649 ws->current_gaps = ws->gaps_outer; 655 ws->current_gaps = ws->gaps_outer;
650 656