aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 2248e1c7..871b3078 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1950,13 +1950,13 @@ static struct cmd_results *cmd_layout(int argc, char **argv) {
}
if (strcasecmp(argv[0], "tabbed") == 0) {
- if (parent->type != C_CONTAINER) {
+ if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){
parent = new_container(parent, L_TABBED);
}
parent->layout = L_TABBED;
} else if (strcasecmp(argv[0], "stacking") == 0) {
- if (parent->type != C_CONTAINER) {
+ if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)) {
parent = new_container(parent, L_STACKED);
}