aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-10-01 09:41:15 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-10-01 09:41:15 -0400
commit742d1764a6fb1fb9269dc9ffe08319da98f4d7b8 (patch)
tree9a9dbe4dd968f78e728496a33e17bf695c773dcd /sway/tree/workspace.c
parentMerge pull request #2737 from Ragnis/criteria-floating (diff)
downloadsway-742d1764a6fb1fb9269dc9ffe08319da98f4d7b8.tar.gz
sway-742d1764a6fb1fb9269dc9ffe08319da98f4d7b8.tar.zst
sway-742d1764a6fb1fb9269dc9ffe08319da98f4d7b8.zip
Fix smart gaps
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