From: Anselm R. Garbe Date: Thu, 24 Aug 2006 07:27:01 +0000 (+0200) Subject: removed unnecessary Xlib call X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=30d72e5f8730bd8e16ead1b3ed40663d1f850fa4;p=dmenu.git removed unnecessary Xlib call --- diff --git a/draw.c b/draw.c index dddede0..38ae8c3 100644 --- a/draw.c +++ b/draw.c @@ -38,8 +38,6 @@ drawtext(const char *text, Bool invert, Bool border) w = 0; if(border) { - XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); - XSetForeground(dpy, dc.gc, dc.border); points[0].x = dc.x; points[0].y = dc.y; points[1].x = dc.w - 1; @@ -50,6 +48,7 @@ drawtext(const char *text, Bool invert, Bool border) points[3].y = 0; points[4].x = 0; points[4].y = -(dc.h - 1); + XSetForeground(dpy, dc.gc, dc.border); XDrawLines(dpy, dc.drawable, dc.gc, points, 5, CoordModePrevious); } diff --git a/main.c b/main.c index 2f20efb..840a7bc 100644 --- a/main.c +++ b/main.c @@ -337,6 +337,7 @@ main(int argc, char *argv[]) /* pixmap */ dc.drawable = XCreatePixmap(dpy, root, mw, mh, DefaultDepth(dpy, screen)); dc.gc = XCreateGC(dpy, root, 0, 0); + XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); if(maxname) cmdw = textw(maxname);