mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Added in default_orientation handling
This commit is contained in:
parent
0a74364656
commit
acb3fbdfb5
5 changed files with 36 additions and 1 deletions
|
|
@ -146,7 +146,16 @@ swayc_t *new_workspace(swayc_t *output, const char *name) {
|
|||
sway_log(L_DEBUG, "Added workspace %s for output %u", name, (unsigned int)output->handle);
|
||||
swayc_t *workspace = new_swayc(C_WORKSPACE);
|
||||
|
||||
workspace->layout = L_HORIZ; // TODO: default layout
|
||||
// TODO: default_layout
|
||||
if (config->default_layout != L_NONE) {
|
||||
workspace->layout = config->default_layout;
|
||||
} else if (config->default_orientation != L_NONE) {
|
||||
workspace->layout = config->default_orientation;
|
||||
} else if (output->width >= output->height) {
|
||||
workspace->layout = L_HORIZ;
|
||||
} else {
|
||||
workspace->layout = L_VERT;
|
||||
}
|
||||
workspace->x = output->x;
|
||||
workspace->y = output->y;
|
||||
workspace->width = output->width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue