aewl

diff draw.c @ 371:fc9d35252ab4

applied sanders somepatches.patch
author Anselm R. Garbe <arg@10kloc.org>
date Mon, 28 Aug 2006 08:02:29 +0200
parents ba6c55e1b9b2
children b1159a638d0a
line diff
     1.1 --- a/draw.c	Fri Aug 25 18:14:55 2006 +0200
     1.2 +++ b/draw.c	Mon Aug 28 08:02:29 2006 +0200
     1.3 @@ -97,9 +97,7 @@
     1.4  	int i, x;
     1.5  
     1.6  	dc.x = dc.y = 0;
     1.7 -	dc.w = bw;
     1.8  
     1.9 -	drawtext(NULL, dc.status, False);
    1.10  	for(i = 0; i < ntags; i++) {
    1.11  		dc.w = textw(tags[i]);
    1.12  		if(seltag[i])
    1.13 @@ -121,9 +119,12 @@
    1.14  	}
    1.15  	drawtext(stext, dc.status, False);
    1.16  
    1.17 -	if(sel && ((dc.w = dc.x - x) > bh)) {
    1.18 +	if((dc.w = dc.x - x) > bh) {
    1.19  		dc.x = x;
    1.20 -		drawtext(sel->name, dc.sel, False);
    1.21 +		if(sel)
    1.22 +			drawtext(sel->name, dc.sel, False);
    1.23 +		else
    1.24 +			drawtext(NULL, dc.norm, False);
    1.25  	}
    1.26  	XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
    1.27  	XSync(dpy, False);