diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index 07dd715c..12d60854 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -1764,8 +1764,16 @@ static struct cmd_results *cmd_layout(int argc, char **argv) { | |||
1764 | // cmd_workspace_layout | 1764 | // cmd_workspace_layout |
1765 | parent->layout = L_HORIZ; | 1765 | parent->layout = L_HORIZ; |
1766 | } else if (strcasecmp(argv[0], "tabbed") == 0) { | 1766 | } else if (strcasecmp(argv[0], "tabbed") == 0) { |
1767 | if (parent->type != C_CONTAINER) { | ||
1768 | parent = new_container(parent, L_TABBED); | ||
1769 | } | ||
1770 | |||
1767 | parent->layout = L_TABBED; | 1771 | parent->layout = L_TABBED; |
1768 | } else if (strcasecmp(argv[0], "stacking") == 0) { | 1772 | } else if (strcasecmp(argv[0], "stacking") == 0) { |
1773 | if (parent->type != C_CONTAINER) { | ||
1774 | parent = new_container(parent, L_STACKED); | ||
1775 | } | ||
1776 | |||
1769 | parent->layout = L_STACKED; | 1777 | parent->layout = L_STACKED; |
1770 | } else if (strcasecmp(argv[0], "splith") == 0) { | 1778 | } else if (strcasecmp(argv[0], "splith") == 0) { |
1771 | parent->layout = L_HORIZ; | 1779 | parent->layout = L_HORIZ; |