summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/container.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c
index b85d2114..e6fa4f37 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -671,7 +671,16 @@ int swayc_gap(swayc_t *container) {
671 if (container->type == C_VIEW) { 671 if (container->type == C_VIEW) {
672 return container->gaps >= 0 ? container->gaps : config->gaps_inner; 672 return container->gaps >= 0 ? container->gaps : config->gaps_inner;
673 } else if (container->type == C_WORKSPACE) { 673 } else if (container->type == C_WORKSPACE) {
674 return container->gaps >= 0 ? container->gaps : config->gaps_outer; 674 int base = container->gaps >= 0 ? container->gaps : config->gaps_outer;
675 if (config->edge_gaps) {
676 // the inner gap is created via a margin around each window which
677 // is half the gap size, so the workspace also needs half a gap
678 // size to make the outermost gap the same size (excluding the
679 // actual "outer gap" size which is handled independently)
680 return base + config->gaps_inner / 2;
681 } else {
682 return base;
683 }
675 } else { 684 } else {
676 return 0; 685 return 0;
677 } 686 }