X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/c09bf8da071e05e2c1d714f0d31d41fe944bc11b..1b855fccd7287ed5c72461540d6a363d3e5b48d7:/draw.c diff --git a/draw.c b/draw.c index 1c6613f..de4bdb0 100644 --- a/draw.c +++ b/draw.c @@ -8,7 +8,7 @@ #include #include -/* static functions */ +/* static */ static void drawborder(void) @@ -90,14 +90,14 @@ drawtext(const char *text, Bool invert, Bool border) } } -/* extern functions */ +/* extern */ void drawall() { Client *c; - for(c = clients; c; c = getnext(c->next)) + for(c = clients; c; c = getnext(c->next, tsel)) drawtitle(c); drawstatus(); } @@ -131,7 +131,7 @@ drawstatus() drawtext(stext, !istile, False); XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); - XFlush(dpy); + XSync(dpy, False); } void @@ -163,9 +163,8 @@ drawtitle(Client *c) dc.x += dc.w; dc.w = textw(c->name); drawtext(c->name, !istile, True); - XCopyArea(dpy, dc.drawable, c->title, dc.gc, - 0, 0, c->tw, c->th, 0, 0); - XFlush(dpy); + XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0); + XSync(dpy, False); } unsigned long