]> git.sur5r.net Git - i3/i3/commitdiff
use con_num_children()
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 28 Nov 2010 21:45:39 +0000 (22:45 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 28 Nov 2010 21:45:39 +0000 (22:45 +0100)
src/cmdparse.y

index 931729d8b9ec11b690cb5b35299a71f8a9a9d268..28cff60c8ef6c88fd7697fe8533f835a2a34c42a 100644 (file)
@@ -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);