diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 2223a98c..aa336e8d 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -130,6 +130,13 @@ static void handle_output_resolution_change(wlc_handle output, const struct wlc_ | |||
130 | if (!c) return; | 130 | if (!c) return; |
131 | c->width = to->w; | 131 | c->width = to->w; |
132 | c->height = to->h; | 132 | c->height = to->h; |
133 | if (config->default_layout == L_NONE && config->default_orientation == L_NONE) { | ||
134 | if (c->width >= c->height) { | ||
135 | ((swayc_t*)c->children->items[0])->layout = L_HORIZ; | ||
136 | } else { | ||
137 | ((swayc_t*)c->children->items[0])->layout = L_VERT; | ||
138 | } | ||
139 | } | ||
133 | arrange_windows(&root_container, -1, -1); | 140 | arrange_windows(&root_container, -1, -1); |
134 | } | 141 | } |
135 | 142 | ||