X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=draw.c;h=178770b27bf022f18c4295c459225342f0e7b6b0;hb=ea4827a5789b6c8241b793a77e5b66f7ac475409;hp=8e3962c47e3712230363afac88a812c9ded16b56;hpb=ceea528eff5ccd1bbd11696209fdc60a5383cc41;p=dwm.git diff --git a/draw.c b/draw.c index 8e3962c..178770b 100644 --- a/draw.c +++ b/draw.c @@ -98,15 +98,6 @@ drawtext(const char *text, unsigned long col[ColLast], Bool filledsquare, Bool e /* extern */ void -drawall(void) { - Client *c; - - for(c = clients; c; c = getnext(c->next)) - drawclient(c); - drawstatus(); -} - -void drawstatus(void) { int i, x; @@ -120,31 +111,20 @@ drawstatus(void) { dc.x += dc.w; } dc.w = bmw; - drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.status, False, False); + drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.norm, False, False); x = dc.x + dc.w; dc.w = textw(stext); - dc.x = bw - dc.w; + dc.x = sw - dc.w; if(dc.x < x) { dc.x = x; - dc.w = bw - x; + dc.w = sw - x; } - drawtext(stext, dc.status, False, False); + drawtext(stext, dc.norm, False, False); if((dc.w = dc.x - x) > bh) { dc.x = x; drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm, False, False); } - XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); - XSync(dpy, False); -} - -void -drawclient(Client *c) { - if(c == sel && issel) { - drawstatus(); - XSetWindowBorder(dpy, c->win, dc.sel[ColBG]); - return; - } - XSetWindowBorder(dpy, c->win, dc.norm[ColBG]); + XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, sw, bh, 0, 0); XSync(dpy, False); }