aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-04-26 10:14:18 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-04-26 10:14:18 +1000
commitae39d7b28caa30652c0e48fda453f509e8e8d784 (patch)
treea61a0fb433462d42b48a23fb58dd3b2a3bc778d8 /sway/commands
parent7ac770f3c0d4aa4b38650ad5ec7d1f5b7e70028a (diff)
Remove sway_container.workspace_layout
Fixes #1716.
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/layout.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
index 4c49a627..ca45a6c8 100644
--- a/sway/commands/layout.c
+++ b/sway/commands/layout.c
@@ -26,9 +26,9 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
// TODO: stacks and tabs
if (strcasecmp(argv[0], "default") == 0) {
- container_set_layout(parent, parent->prev_layout);
+ parent->layout = parent->prev_layout;
if (parent->layout == L_NONE) {
- container_set_layout(parent, container_get_default_layout(parent));
+ parent->layout = container_get_default_layout(parent);
}
} else {
if (parent->layout != L_TABBED && parent->layout != L_STACKED) {
@@ -36,15 +36,14 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
}
if (strcasecmp(argv[0], "splith") == 0) {
- container_set_layout(parent, L_HORIZ);
+ parent->layout = L_HORIZ;
} else if (strcasecmp(argv[0], "splitv") == 0) {
- container_set_layout(parent, L_VERT);
+ parent->layout = L_VERT;
} else if (strcasecmp(argv[0], "toggle") == 0 && argc == 2 && strcasecmp(argv[1], "split") == 0) {
- if (parent->layout == L_HORIZ && (parent->workspace_layout == L_NONE
- || parent->workspace_layout == L_HORIZ)) {
- container_set_layout(parent, L_VERT);
+ if (parent->layout == L_HORIZ) {
+ parent->layout = L_VERT;
} else {
- container_set_layout(parent, L_HORIZ);
+ parent->layout = L_HORIZ;
}
}
}