mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
basic layout command
This commit is contained in:
parent
bcb870bcf2
commit
66d1e0b313
5 changed files with 81 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue