summaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <[email protected]>2016-04-01 13:36:36 +0200
committerMikkel Oscar Lyderik <[email protected]>2016-04-25 00:00:49 +0200
commit8d700fe008ccf9f7eb4664e236277c9f30a449fb (patch)
treefb9f36de0acca621a6995db59c52cf3eb2002770 /sway/commands.c
parentec7ff769c7b4da616ebe6bfd90b70350dd39e166 (diff)
Fix problems with floating windows
Makes any tabbed/stacked layout a container to separate from floating windows which may be attached to a workspace.
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c8
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) {
// cmd_workspace_layout
parent->layout = L_HORIZ;
} else if (strcasecmp(argv[0], "tabbed") == 0) {
+ if (parent->type != C_CONTAINER) {
+ parent = new_container(parent, L_TABBED);
+ }
+
parent->layout = L_TABBED;
} else if (strcasecmp(argv[0], "stacking") == 0) {
+ if (parent->type != C_CONTAINER) {
+ parent = new_container(parent, L_STACKED);
+ }
+
parent->layout = L_STACKED;
} else if (strcasecmp(argv[0], "splith") == 0) {
parent->layout = L_HORIZ;