dwm-meillo

diff client.c @ 60:24f9c674d03f

made stdin reader more robust
author Anselm R. Garbe <garbeam@wmii.de>
date Fri, 14 Jul 2006 12:08:32 +0200
parents f005d46462e8
children 0a4b066ce254
line diff
     1.1 --- a/client.c	Fri Jul 14 11:57:33 2006 +0200
     1.2 +++ b/client.c	Fri Jul 14 12:08:32 2006 +0200
     1.3 @@ -404,8 +404,6 @@
     1.4  	c->next = *l; /* *l == nil */
     1.5  	*l = c;
     1.6  
     1.7 -	XMapRaised(dpy, c->win);
     1.8 -	XMapRaised(dpy, c->title);
     1.9  	XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
    1.10  			GrabModeAsync, GrabModeSync, None, None);
    1.11  	XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
    1.12 @@ -418,10 +416,17 @@
    1.13  			|| ((c->maxw == c->minw) && (c->maxh == c->minh));
    1.14  
    1.15  	arrange(NULL);
    1.16 -	if(c->tags[tsel])
    1.17 +	/* mapping the window now prevents flicker */
    1.18 +	if(c->tags[tsel]) {
    1.19 +		XMapRaised(dpy, c->win);
    1.20 +		XMapRaised(dpy, c->title);
    1.21  		focus(c);
    1.22 -	else
    1.23 +	}
    1.24 +	else {
    1.25  		ban_client(c);
    1.26 +		XMapRaised(dpy, c->win);
    1.27 +		XMapRaised(dpy, c->title);
    1.28 +	}
    1.29  }
    1.30  
    1.31  void