X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/0045ad87dfb32f35fc17b5b8942049cfe84d623c..2c1db7ed354f303c2a2aa7eb6b7de3a0dac5d022:/draw.c?ds=inline diff --git a/draw.c b/draw.c index 19604f3..178770b 100644 --- a/draw.c +++ b/draw.c @@ -97,15 +97,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; @@ -123,28 +114,17 @@ drawstatus(void) { 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.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[ColBorder]); - return; - } - XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); + XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, sw, bh, 0, 0); XSync(dpy, False); }