diff options
Diffstat (limited to 'src/layout.c')
| -rw-r--r-- | src/layout.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/layout.c b/src/layout.c index 6b6590e..92e6469 100644 --- a/src/layout.c +++ b/src/layout.c @@ -32,7 +32,12 @@ void layout_init(layout_t *layout, block_t *block, layout_info_t info) layout->n_children++; } - if (layout->n_children > 0) { + if (block->group.collapse && layout->n_children == 1) { + layout_t *children = layout->children; + memcpy(layout, children, sizeof(layout_t)); + free(children); + + } else if (layout->n_children > 0) { layout_t *last = &layout->children[layout->n_children - 1]; layout->width = last->x + last->width - x_offset; |
