sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit ce54b4ff2eeda61ead9389a9bfd41aa7310a6ece
parent adf5b8fed70b3b61e67f16c3bec4a9b25d8ec831
Author: S. Christoffer Eliesen <christoffer@eliesen.no>
Date:   Sat, 19 Dec 2015 01:21:00 +0100

container: Fix inner gaps against screen edge.

Diffstat:
Msway/container.c | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git 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; }