aewl

diff client.c @ 450:728c9089b079

applied sanders patch of not manipulating sel
author Anselm R. Garbe <arg@10kloc.org>
date Fri, 08 Sep 2006 08:19:54 +0200
parents 8089f22fdb46
children 026aba558fdf
line diff
     1.1 --- a/client.c	Fri Sep 08 07:40:16 2006 +0200
     1.2 +++ b/client.c	Fri Sep 08 08:19:54 2006 +0200
     1.3 @@ -414,14 +414,16 @@
     1.4  void
     1.5  unmanage(Client *c)
     1.6  {
     1.7 +	Client *nc;
     1.8 +
     1.9  	XGrabServer(dpy);
    1.10  	XSetErrorHandler(xerrordummy);
    1.11  
    1.12  	detach(c);
    1.13  	detachstack(c);
    1.14  	if(sel == c) {
    1.15 -		for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
    1.16 -		focus(sel);
    1.17 +		for(nc = stack; nc && !isvisible(nc); nc = nc->snext);
    1.18 +		focus(nc);
    1.19  	}
    1.20  
    1.21  	XUngrabButton(dpy, AnyButton, AnyModifier, c->win);