From: Michael Stapelberg Date: Sat, 19 Feb 2011 18:50:09 +0000 (+0100) Subject: Skip containers which got only one child when looking for the next/previous one to... X-Git-Tag: tree-pr2~52 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=86500c5b889c55cd9308d4fb9349605a944cb91c;p=i3%2Fi3 Skip containers which got only one child when looking for the next/previous one to focus --- diff --git a/src/tree.c b/src/tree.c index f2b1d90e..c741e65a 100644 --- a/src/tree.c +++ b/src/tree.c @@ -329,7 +329,8 @@ void tree_next(char way, orientation_t orientation) { /* 1: get the first parent with the same orientation */ Con *parent = focused->parent; while (focused->type != CT_WORKSPACE && - con_orientation(parent) != orientation) { + (con_orientation(parent) != orientation || + con_num_children(parent) == 1)) { LOG("need to go one level further up\n"); /* if the current parent is an output, we are at a workspace * and the orientation still does not match */