- if(stack) {
- brush.rect.width = textwidth(&brush.font, stack->name) + labelheight(&brush.font);
- swap((void **)&brush.fg, (void **)&brush.bg);
- draw(dpy, &brush, False, stack->name);
- swap((void **)&brush.fg, (void **)&brush.bg);
- brush.rect.x += brush.rect.width;
+ modw = textw(mode) + dc.font.height;
+ dc.w = 0;
+ for(i = 0; i < TLast; i++) {
+ dc.x += dc.w;
+ dc.w = textw(tags[i]) + dc.font.height;
+ drawtext(tags[i], i == tsel, True);
+ }
+ if(sel) {
+ dc.x += dc.w;
+ dc.w = textw(sel->name) + dc.font.height;
+ drawtext(sel->name, True, True);