summaryrefslogtreecommitdiffstats
path: root/sway/container.c
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-22 22:44:02 +0200
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-25 00:00:49 +0200
commit5492277f0c007eea632d242a6d7cbd9cee7cdcf6 (patch)
tree30b4e754dfc2b4a76b357a3a2f8b4833732a2bea /sway/container.c
parentAdd support for nested tabbed/stacked containers (diff)
downloadsway-5492277f0c007eea632d242a6d7cbd9cee7cdcf6.tar.gz
sway-5492277f0c007eea632d242a6d7cbd9cee7cdcf6.tar.zst
sway-5492277f0c007eea632d242a6d7cbd9cee7cdcf6.zip
Disable inner gaps when in tabbed/stacked mode
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c
index f4258c84..9db81012 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -218,6 +218,7 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) {
218 cont->y = child->y; 218 cont->y = child->y;
219 cont->visible = child->visible; 219 cont->visible = child->visible;
220 cont->cached_geometry = child->cached_geometry; 220 cont->cached_geometry = child->cached_geometry;
221 cont->gaps = child->gaps;
221 222
222 /* Container inherits all of workspaces children, layout and whatnot */ 223 /* Container inherits all of workspaces children, layout and whatnot */
223 if (child->type == C_WORKSPACE) { 224 if (child->type == C_WORKSPACE) {
@@ -680,7 +681,7 @@ bool swayc_is_child_of(swayc_t *child, swayc_t *parent) {
680} 681}
681 682
682int swayc_gap(swayc_t *container) { 683int swayc_gap(swayc_t *container) {
683 if (container->type == C_VIEW) { 684 if (container->type == C_VIEW || container->type == C_CONTAINER) {
684 return container->gaps >= 0 ? container->gaps : config->gaps_inner; 685 return container->gaps >= 0 ? container->gaps : config->gaps_inner;
685 } else if (container->type == C_WORKSPACE) { 686 } else if (container->type == C_WORKSPACE) {
686 int base = container->gaps >= 0 ? container->gaps : config->gaps_outer; 687 int base = container->gaps >= 0 ? container->gaps : config->gaps_outer;