- draw_text((char*)ws_walk->ucs2_name, ws_walk->name_glyphs, true,
- outputs_walk->buffer, outputs_walk->bargc, i + 5, 2, ws_walk->name_width);
- i += 10 + ws_walk->name_width;
+ draw_text(ws_walk->name, outputs_walk->buffer, outputs_walk->bargc, i + 5, 2, ws_walk->name_width);
+ i += 10 + ws_walk->name_width + 1;
+
+ }
+
+ if (binding.name) {
+
+ uint32_t fg_color = colors.urgent_ws_fg;
+ uint32_t bg_color = colors.urgent_ws_bg;
+ uint32_t mask = XCB_GC_FOREGROUND | XCB_GC_BACKGROUND;
+
+ uint32_t vals_border[] = { colors.urgent_ws_border, colors.urgent_ws_border };
+ xcb_change_gc(xcb_connection,
+ outputs_walk->bargc,
+ mask,
+ vals_border);
+ xcb_rectangle_t rect_border = { i, 0, binding.width + 10, font.height + 4 };
+ xcb_poly_fill_rectangle(xcb_connection,
+ outputs_walk->buffer,
+ outputs_walk->bargc,
+ 1,
+ &rect_border);
+
+ uint32_t vals[] = { bg_color, bg_color };
+ xcb_change_gc(xcb_connection,
+ outputs_walk->bargc,
+ mask,
+ vals);
+ xcb_rectangle_t rect = { i + 1, 1, binding.width + 8, font.height + 2 };
+ xcb_poly_fill_rectangle(xcb_connection,
+ outputs_walk->buffer,
+ outputs_walk->bargc,
+ 1,
+ &rect);
+
+ set_font_colors(outputs_walk->bargc, fg_color, bg_color);
+ draw_text(binding.name, outputs_walk->buffer, outputs_walk->bargc, i + 5, 2, binding.width);