mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -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
|
|
@ -130,6 +130,13 @@ static void handle_output_resolution_change(wlc_handle output, const struct wlc_
|
|||
if (!c) return;
|
||||
c->width = to->w;
|
||||
c->height = to->h;
|
||||
if (config->default_layout == L_NONE && config->default_orientation == L_NONE) {
|
||||
if (c->width >= c->height) {
|
||||
((swayc_t*)c->children->items[0])->layout = L_HORIZ;
|
||||
} else {
|
||||
((swayc_t*)c->children->items[0])->layout = L_VERT;
|
||||
}
|
||||
}
|
||||
arrange_windows(&root_container, -1, -1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue