}
n->parent = c;
if (f->presel == NULL) {
- if (p == NULL || (f->client != NULL && IS_TILED(f->client) && tiled_count(d->root, true) == 1)) {
+ if (p == NULL || automatic_scheme == SCHEME_LONGEST_SIDE || (f->client != NULL && IS_TILED(f->client) && tiled_count(d->root, true) == 1)) {
if (p != NULL) {
if (is_first_child(f)) {
p->first_child = c;
c->first_child = f;
c->second_child = n;
}
- if (m->rectangle.width > m->rectangle.height) {
+ if (f->rectangle.width > f->rectangle.height) {
c->split_type = TYPE_VERTICAL;
} else {
c->split_type = TYPE_HORIZONTAL;