i3 - improved tiling WM


Bugfix: Set separator color properly when drawing

Patch status: merged

Patch by AndrĂ¡s Mohari

Long description:

Set the colors in the GC directly since set_font_colors() does not do it
when using a Pango font, resulting in i3bar drawing separators in the
wrong color.

To apply this patch, use:
curl http://cr.i3wm.org/patch/59/raw.patch | git am

b/i3bar/src/xcb.c

16
@@ -179,7 +179,9 @@ void refresh_statusline(void) {
17
         if (TAILQ_NEXT(block, blocks) != NULL && !block->no_separator && block->sep_block_width > 0) {
18
             /* This is not the last block, draw a separator. */
19
             uint32_t sep_offset = block->sep_block_width/2 + block->sep_block_width % 2;
20
-            set_font_colors(statusline_ctx, colors.sep_fg, colors.bar_bg);
21
+            uint32_t mask = XCB_GC_FOREGROUND | XCB_GC_BACKGROUND;
22
+            uint32_t values[] = { colors.sep_fg, colors.bar_bg };
23
+            xcb_change_gc(xcb_connection, statusline_ctx, mask, values);
24
             xcb_poly_line(xcb_connection, XCB_COORD_MODE_ORIGIN, statusline_pm,
25
                           statusline_ctx, 2,
26
                           (xcb_point_t[]){ { x - sep_offset, 2 },