mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Correctly determine default layout
This commit is contained in:
parent
8d700fe008
commit
d26658fb35
5 changed files with 22 additions and 14 deletions
|
|
@ -163,16 +163,8 @@ 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);
|
||||
|
||||
// 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->layout = default_layout(output);
|
||||
|
||||
workspace->x = output->x;
|
||||
workspace->y = output->y;
|
||||
workspace->width = output->width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue