+ Con *child;
+ TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
+ assert(children > 0);
+
+ /* default layout */
+ if (con->layout == L_SPLITH || con->layout == L_SPLITV) {
+ if (con->layout == L_SPLITH) {
+ child->rect.x = x;
+ child->rect.y = y;
+ child->rect.width = sizes[i];
+ child->rect.height = rect.height;
+ x += child->rect.width;
+ } else {
+ child->rect.x = x;
+ child->rect.y = y;
+ child->rect.width = rect.width;
+ child->rect.height = sizes[i];
+ y += child->rect.height;
+ }
+
+ /* first we have the decoration, if this is a leaf node */
+ if (con_is_leaf(child)) {
+ if (child->border_style == BS_NORMAL) {
+ /* TODO: make a function for relative coords? */
+ child->deco_rect.x = child->rect.x - con->rect.x;
+ child->deco_rect.y = child->rect.y - con->rect.y;
+
+ child->rect.y += deco_height;
+ child->rect.height -= deco_height;
+
+ child->deco_rect.width = child->rect.width;
+ child->deco_rect.height = deco_height;
+ } else {
+ child->deco_rect.x = 0;
+ child->deco_rect.y = 0;
+ child->deco_rect.width = 0;
+ child->deco_rect.height = 0;
+ }
+ }
+ }