aboutsummaryrefslogtreecommitdiff
path: root/sway/container.c
diff options
context:
space:
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) {
cont->y = child->y;
cont->visible = child->visible;
cont->cached_geometry = child->cached_geometry;
+ cont->gaps = child->gaps;
/* Container inherits all of workspaces children, layout and whatnot */
if (child->type == C_WORKSPACE) {
@@ -680,7 +681,7 @@ bool swayc_is_child_of(swayc_t *child, swayc_t *parent) {
}
int swayc_gap(swayc_t *container) {
- if (container->type == C_VIEW) {
+ if (container->type == C_VIEW || container->type == C_CONTAINER) {
return container->gaps >= 0 ? container->gaps : config->gaps_inner;
} else if (container->type == C_WORKSPACE) {
int base = container->gaps >= 0 ? container->gaps : config->gaps_outer;