diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-20 12:29:47 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-20 12:29:47 +0100 |
commit | 2935e24cf506ea2ab18952b3d525db0ef4d83762 (patch) | |
tree | cce18134cdc904d0d3ba720e245dcf96274f564b /sway/container.c | |
parent | Merge pull request #523 from mikkeloscar/slack-key-handler (diff) | |
download | sway-2935e24cf506ea2ab18952b3d525db0ef4d83762.tar.gz sway-2935e24cf506ea2ab18952b3d525db0ef4d83762.tar.zst sway-2935e24cf506ea2ab18952b3d525db0ef4d83762.zip |
Implement 'smart_gaps' feature from i3-gaps
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c index e4c20bc9..9330a3de 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -675,7 +675,7 @@ int swayc_gap(swayc_t *container) { | |||
675 | return container->gaps >= 0 ? container->gaps : config->gaps_inner; | 675 | return container->gaps >= 0 ? container->gaps : config->gaps_inner; |
676 | } else if (container->type == C_WORKSPACE) { | 676 | } else if (container->type == C_WORKSPACE) { |
677 | int base = container->gaps >= 0 ? container->gaps : config->gaps_outer; | 677 | int base = container->gaps >= 0 ? container->gaps : config->gaps_outer; |
678 | if (config->edge_gaps) { | 678 | if (config->edge_gaps && !(config->smart_gaps && container->children->length == 1)) { |
679 | // the inner gap is created via a margin around each window which | 679 | // the inner gap is created via a margin around each window which |
680 | // is half the gap size, so the workspace also needs half a gap | 680 | // is half the gap size, so the workspace also needs half a gap |
681 | // size to make the outermost gap the same size (excluding the | 681 | // size to make the outermost gap the same size (excluding the |