aewl

changeset 450:728c9089b079 1.5

applied sanders patch of not manipulating sel
author Anselm R. Garbe <arg@10kloc.org>
date Fri, 08 Sep 2006 08:19:54 +0200
parents 78d36a1dd1d9
children d358f2daa8ba
files client.c view.c
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
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);
     2.1 --- a/view.c	Fri Sep 08 07:40:16 2006 +0200
     2.2 +++ b/view.c	Fri Sep 08 08:19:54 2006 +0200
     2.3 @@ -77,8 +77,8 @@
     2.4  			ban(c);
     2.5  	}
     2.6  	if(!sel || !isvisible(sel)) {
     2.7 -		for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
     2.8 -		focus(sel);
     2.9 +		for(c = stack; c && !isvisible(c); c = c->snext);
    2.10 +		focus(c);
    2.11  	}
    2.12  	restack();
    2.13  }
    2.14 @@ -141,8 +141,8 @@
    2.15  			ban(c);
    2.16  	}
    2.17  	if(!sel || !isvisible(sel)) {
    2.18 -		for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
    2.19 -		focus(sel);
    2.20 +		for(c = stack; c && !isvisible(c); c = c->snext);
    2.21 +		focus(c);
    2.22  	}
    2.23  	restack();
    2.24  }