diff options
author | D.B <thejan.2009@gmail.com> | 2016-11-17 06:49:12 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-12-04 08:31:34 -0500 |
commit | 35b8d185ac58eaaeb12a95d6947cdcb78a2ee487 (patch) | |
tree | fdfeef48c18a9a484b7491d38a6ee0be12801f7c /sway/container.c | |
parent | 4762bcb3b9a1b9043ce78c7765d4513b0c5da635 (diff) |
fix layout switching (was broken because of workspace_layout)
For workspace containers, swayc_change_layout also changes ->layout alongside
->workspace_layout when it's a sensible thing to do. There is an additional test
for 'layout toggle' command which ensures that containers will be tiled
horizontally after toggling from tabbed or stacked.
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c index c588f3db..e5284200 100644 --- a/sway/container.c +++ b/sway/container.c @@ -950,6 +950,9 @@ swayc_t *swayc_tabbed_stacked_parent(swayc_t *con) { swayc_t *swayc_change_layout(swayc_t *container, enum swayc_layouts layout) { if (container->type == C_WORKSPACE) { container->workspace_layout = layout; + if (layout == L_HORIZ || layout == L_VERT) { + container->layout = layout; + } } else { container->layout = layout; } |