mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
Correctly determine default layout
This commit is contained in:
parent
8d700fe008
commit
d26658fb35
5 changed files with 22 additions and 14 deletions
|
|
@ -993,3 +993,15 @@ void recursive_resize(swayc_t *container, double amount, enum wlc_resize_edge ed
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum swayc_layouts default_layout(swayc_t *output) {
|
||||
if (config->default_layout != L_NONE) {
|
||||
return config->default_layout;
|
||||
} else if (config->default_orientation != L_NONE) {
|
||||
return config->default_orientation;
|
||||
} else if (output->width >= output->height) {
|
||||
return L_HORIZ;
|
||||
} else {
|
||||
return L_VERT;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue