From e7fa504c3e095db65853afd39d2d1324d439dcf4 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Fri, 14 Jul 2006 17:43:56 +0200 Subject: removed a bunch of lines through swap removal --- draw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'draw.c') diff --git a/draw.c b/draw.c index ec7a3cd..3fbc85c 100644 --- a/draw.c +++ b/draw.c @@ -30,7 +30,7 @@ drawborder(void) } void -drawtext(const char *text, Bool border) +drawtext(const char *text, Bool invert, Bool border) { int x, y, w, h; unsigned int len; @@ -38,7 +38,7 @@ drawtext(const char *text, Bool border) XGCValues gcv; XRectangle r = { dc.x, dc.y, dc.w, dc.h }; - XSetForeground(dpy, dc.gc, dc.bg); + XSetForeground(dpy, dc.gc, invert ? dc.fg : dc.bg); XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1); w = 0; @@ -65,8 +65,8 @@ drawtext(const char *text, Bool border) if(w > dc.w) return; /* too long */ - gcv.foreground = dc.fg; - gcv.background = dc.bg; + gcv.foreground = invert ? dc.bg : dc.fg; + gcv.background = invert ? dc.fg : dc.bg; if(dc.font.set) { XChangeGC(dpy, dc.gc, GCForeground | GCBackground, &gcv); XmbDrawImageString(dpy, dc.drawable, dc.font.set, dc.gc, -- cgit v1.2.3