-/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
- * See LICENSE file for license details.
- */
+/* See LICENSE file for copyright and license details. */
#include "dwm.h"
#include <string.h>
dc.x = dc.y = 0;
for(i = 0; i < ntags; i++) {
dc.w = textw(tags[i]);
- if(seltag[i]) {
+ if(seltags[i]) {
drawtext(tags[i], dc.sel);
drawsquare(sel && sel->tags[i], isoccupied(i), dc.sel);
}
dc.x += dc.w;
}
dc.w = blw;
- drawtext(lt->symbol, dc.norm);
+ drawtext(getsymbol(), dc.norm);
x = dc.x + dc.w;
dc.w = textw(stext);
dc.x = sw - dc.w;
int x, y, w, h;
static char buf[256];
unsigned int len, olen;
- XGCValues gcv;
XRectangle r = { dc.x, dc.y, dc.w, dc.h };
XSetForeground(dpy, dc.gc, col[ColBG]);
}
if(w > dc.w)
return; /* too long */
- gcv.foreground = col[ColFG];
- if(dc.font.set) {
- XChangeGC(dpy, dc.gc, GCForeground, &gcv);
+ XSetForeground(dpy, dc.gc, col[ColFG]);
+ if(dc.font.set)
XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
- }
- else {
- gcv.font = dc.font.xfont->fid;
- XChangeGC(dpy, dc.gc, GCForeground | GCFont, &gcv);
+ else
XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
- }
}
unsigned int