diff options
author | Drew DeVault <[email protected]> | 2015-12-20 15:44:42 -0500 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2015-12-20 15:44:42 -0500 |
commit | 5fbecba37ad9f19a9205715315248e7b82aa984d (patch) | |
tree | ad1c5b9bc9c53c213887284095305aea1814f80c /sway/container.c | |
parent | adf5b8fed70b3b61e67f16c3bec4a9b25d8ec831 (diff) | |
parent | f4b9c3856a03ce51d8761c32da8bd0986680b534 (diff) |
Merge pull request #381 from sce/fix_gaps
Fix gaps
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 11 |
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) { if (container->type == C_VIEW) { return container->gaps >= 0 ? container->gaps : config->gaps_inner; } else if (container->type == C_WORKSPACE) { - return container->gaps >= 0 ? container->gaps : config->gaps_outer; + int base = container->gaps >= 0 ? container->gaps : config->gaps_outer; + if (config->edge_gaps) { + // the inner gap is created via a margin around each window which + // is half the gap size, so the workspace also needs half a gap + // size to make the outermost gap the same size (excluding the + // actual "outer gap" size which is handled independently) + return base + config->gaps_inner / 2; + } else { + return base; + } } else { return 0; } |