if (!render_fullscreen)
*inset = rect_add(*inset, con_border_style_rect(con));
+ DLOG("Starting with inset = (%d, %d) %d x %d\n", inset->x, inset->y, inset->width, inset->height);
/* Obey x11 border */
+ DLOG("X11 border: %d\n", con->border_width);
inset->width -= (2 * con->border_width);
inset->height -= (2 * con->border_width);
}
/* find the height for the decorations */
- i3Font *font = load_font(conn, config.font);
- int deco_height = font->height + 5;
+ int deco_height = config.font.height + 5;
/* precalculate the sizes to be able to correct rounding errors */
int sizes[children];
if (con->layout == L_DEFAULT && children > 0) {
+ assert(!TAILQ_EMPTY(&con->nodes_head));
Con *child;
int i = 0, assigned = 0;
int total = con->orientation == HORIZ ? rect.width : rect.height;
/* FIXME: refactor this into separate functions: */
Con *child;
TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
+ assert(children > 0);
/* default layout */
if (con->layout == L_DEFAULT) {
/* in a stacking or tabbed container, we ensure the focused client is raised */
if (con->layout == L_STACKED || con->layout == L_TABBED) {
- Con *foc = TAILQ_FIRST(&(con->focus_head));
- if (foc != TAILQ_END(&(con->focus_head))) {
- DLOG("con %p is stacking, raising %p\n", con, foc);
- x_raise_con(foc);
- /* by rendering the stacked container again, we handle the case
- * that we have a non-leaf-container inside the stack. */
- render_con(foc, false);
+ DLOG("stacked/tabbed, raising focused reverse\n");
+ TAILQ_FOREACH_REVERSE(child, &(con->focus_head), focus_head, focused)
+ x_raise_con(child);
+ DLOG("done\n");
+ if ((child = TAILQ_FIRST(&(con->focus_head)))) {
+ DLOG("con %p is stacking, raising %p\n", con, child);
+ /* By rendering the stacked container again, we handle the case
+ * that we have a non-leaf-container inside the stack. In that
+ * case, the children of the non-leaf-container need to be raised
+ * aswell. */
+ render_con(child, false);
}
}
}