aewl

diff draw.c @ 66:50450aa24a46

removed a bunch of lines through swap removal
author Anselm R. Garbe <garbeam@wmii.de>
date Fri, 14 Jul 2006 17:43:56 +0200
parents f005d46462e8
children c2ddb9dbbd10
line diff
     1.1 --- a/draw.c	Fri Jul 14 17:30:37 2006 +0200
     1.2 +++ b/draw.c	Fri Jul 14 17:43:56 2006 +0200
     1.3 @@ -30,7 +30,7 @@
     1.4  }
     1.5  
     1.6  void
     1.7 -drawtext(const char *text, Bool border)
     1.8 +drawtext(const char *text, Bool invert, Bool border)
     1.9  {
    1.10  	int x, y, w, h;
    1.11  	unsigned int len;
    1.12 @@ -38,7 +38,7 @@
    1.13  	XGCValues gcv;
    1.14  	XRectangle r = { dc.x, dc.y, dc.w, dc.h };
    1.15  
    1.16 -	XSetForeground(dpy, dc.gc, dc.bg);
    1.17 +	XSetForeground(dpy, dc.gc, invert ? dc.fg : dc.bg);
    1.18  	XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
    1.19  
    1.20  	w = 0;
    1.21 @@ -65,8 +65,8 @@
    1.22  	if(w > dc.w)
    1.23  		return; /* too long */
    1.24  
    1.25 -	gcv.foreground = dc.fg;
    1.26 -	gcv.background = dc.bg;
    1.27 +	gcv.foreground = invert ? dc.bg : dc.fg;
    1.28 +	gcv.background = invert ? dc.fg : dc.bg;
    1.29  	if(dc.font.set) {
    1.30  		XChangeGC(dpy, dc.gc, GCForeground | GCBackground, &gcv);
    1.31  		XmbDrawImageString(dpy, dc.drawable, dc.font.set, dc.gc,