- Colormap cmap = DefaultColormap(dpy, screen);
- b->bg = xloadcolors(dpy, cmap, bg);
- b->fg = xloadcolors(dpy, cmap, fg);
- b->border = xloadcolors(dpy, cmap, border);
+ int i, x;
+ Bool istile = arrange == dotile;
+
+ dc.x = dc.y = 0;
+ dc.w = bw;
+ drawtext(NULL, !istile, False);
+
+ dc.w = 0;
+ for(i = 0; i < TLast; i++) {
+ dc.x += dc.w;
+ dc.w = textw(tags[i]);
+ if(istile)
+ drawtext(tags[i], (i == tsel), True);
+ else
+ drawtext(tags[i], (i != tsel), True);
+ }
+ x = dc.x + dc.w;
+ dc.w = textw(stext);
+ dc.x = bx + bw - dc.w;
+ drawtext(stext, !istile, False);
+ if(sel && ((dc.w = dc.x - x) >= bh)) {
+ dc.x = x;
+ drawtext(sel->name, istile, True);
+ }
+ XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
+ XSync(dpy, False);