diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-02-22 18:03:46 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-02-22 18:37:14 -0500 |
commit | 66d1e0b313c6bbee142bb08e4af07ce6f15cffca (patch) | |
tree | f00e015bbf929b4d88bfe5b12e0f809f2c27525e /sway/tree | |
parent | bcb870bcf2b31b4b03ef746bd60b74eb3ea9cb78 (diff) | |
download | sway-66d1e0b313c6bbee142bb08e4af07ce6f15cffca.tar.xz |
basic layout command
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 84e14ba6..b56e72e1 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -400,3 +400,15 @@ void container_for_each_bfs(swayc_t *con, void (*f)(swayc_t *con, void *data), list_free(queue); } + +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; + } + return container; +} |