From: Bastien Dejean Date: Mon, 24 Sep 2012 18:15:25 +0000 (+0200) Subject: Take tall screens into consideration X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=310ca26900349635110931ea5f80b63bf8ccda69;p=bspwm.git Take tall screens into consideration --- diff --git a/tree.c b/tree.c index b1c804d..b7300b4 100644 --- a/tree.c +++ b/tree.c @@ -300,7 +300,10 @@ void insert_node(desktop_t *d, node_t *n) if (fopar == NULL) { dad->first_child = n; dad->second_child = focus; - dad->split_type = TYPE_VERTICAL; + if (focus->rectangle.width > focus->rectangle.height) + dad->split_type = TYPE_VERTICAL; + else + dad->split_type = TYPE_HORIZONTAL; focus->parent = dad; d->root = dad; } else {