From acb3fbdfb559e461aaac6d357146f43c4e9c3d38 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Thu, 27 Aug 2015 21:52:59 -0500 Subject: Added in default_orientation handling --- sway/handlers.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sway/handlers.c') 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_ 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); } -- cgit v1.2.3