+ /* Draw the text of each block. */
+ uint32_t x = 0;
+ TAILQ_FOREACH(block, &statusline_head, blocks) {
+ uint32_t colorpixel = (block->color ? get_colorpixel(block->color) : colors.bar_fg);
+ set_font_colors(statusline_ctx, colorpixel, colors.bar_bg);
+ draw_text((char*)block->ucs2_full_text, block->glyph_count_full_text,
+ true, statusline_pm, statusline_ctx, x, 0, block->width);
+ x += block->width;
+
+ if (TAILQ_NEXT(block, blocks) != NULL) {
+ /* This is not the last block, draw a separator. */
+ set_font_colors(statusline_ctx, get_colorpixel("#666666"), colors.bar_bg);
+ xcb_poly_line(xcb_connection, XCB_COORD_MODE_ORIGIN, statusline_pm,
+ statusline_ctx, 2,
+ (xcb_point_t[]){ { x - 5, 2 }, { x - 5, font.height - 2 } });
+ }
+
+ FREE(block->ucs2_full_text);
+ }