]> git.lizzy.rs Git - bspwm.git/commitdiff
Take tall screens into consideration
authorBastien Dejean <nihilhill@gmail.com>
Mon, 24 Sep 2012 18:15:25 +0000 (20:15 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Mon, 24 Sep 2012 18:15:25 +0000 (20:15 +0200)
tree.c

diff --git a/tree.c b/tree.c
index b1c804d560504efeb9a9f89678bf8551e348bf02..b7300b4e803e0c8040cb1b39b339c1a92ea4b2b5 100644 (file)
--- 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 {