aewl

diff bar.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 1269bd127551
children 7681ef838201
line diff
     1.1 --- a/bar.c	Fri Jul 14 17:30:37 2006 +0200
     1.2 +++ b/bar.c	Fri Jul 14 17:43:56 2006 +0200
     1.3 @@ -25,30 +25,22 @@
     1.4  	int i;
     1.5  	dc.x = dc.y = 0;
     1.6  	dc.w = bw;
     1.7 -	drawtext(NULL, False);
     1.8 +	drawtext(NULL, False, False);
     1.9  
    1.10  	dc.w = 0;
    1.11  	for(i = 0; i < TLast; i++) {
    1.12  		dc.x += dc.w;
    1.13  		dc.w = textw(tags[i]) + dc.font.height;
    1.14 -		if(i == tsel) {
    1.15 -			swap((void **)&dc.fg, (void **)&dc.bg);
    1.16 -			drawtext(tags[i], True);
    1.17 -			swap((void **)&dc.fg, (void **)&dc.bg);
    1.18 -		}
    1.19 -		else
    1.20 -			drawtext(tags[i], True);
    1.21 +		drawtext(tags[i], i == tsel, True);
    1.22  	}
    1.23  	if(sel) {
    1.24 -		swap((void **)&dc.fg, (void **)&dc.bg);
    1.25  		dc.x += dc.w;
    1.26  		dc.w = textw(sel->name) + dc.font.height;
    1.27 -		drawtext(sel->name, True);
    1.28 -		swap((void **)&dc.fg, (void **)&dc.bg);
    1.29 +		drawtext(sel->name, True, True);
    1.30  	}
    1.31  	dc.w = textw(stext) + dc.font.height;
    1.32  	dc.x = bx + bw - dc.w;
    1.33 -	drawtext(stext, False);
    1.34 +	drawtext(stext, False, False);
    1.35  	XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
    1.36  	XFlush(dpy);
    1.37  }