From: Michael Stapelberg Date: Sun, 28 Nov 2010 21:45:39 +0000 (+0100) Subject: use con_num_children() X-Git-Tag: tree-pr1~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a86d8ab329b94c6c259c001ab210dac84fb7535b;p=i3%2Fi3 use con_num_children() --- diff --git a/src/cmdparse.y b/src/cmdparse.y index 931729d8..28cff60c 100644 --- a/src/cmdparse.y +++ b/src/cmdparse.y @@ -650,10 +650,8 @@ resize: } else { LOG("tiling resize\n"); /* get the default percentage */ - int children = 0; + int children = con_num_children(focused->parent); Con *other; - TAILQ_FOREACH(other, &(focused->parent->nodes_head), nodes) - children++; LOG("ins. %d children\n", children); double percentage = 1.0 / children; LOG("default percentage = %f\n", percentage);