summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-14 17:43:56 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-14 17:43:56 +0200
commite7fa504c3e095db65853afd39d2d1324d439dcf4 (patch)
tree54359cd50c69cc580a963eb53ffee8f43f214661 /draw.c
parent5b44976a2d8bdd1397727663ce019374d6b2730a (diff)
removed a bunch of lines through swap removal
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/draw.c b/draw.c
index ec7a3cd5..3fbc85c7 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,