dwm-meillo

diff client.c @ 447:16c4e4c5fb15

simplified unmanage
author Anselm R. Garbe <arg@10kloc.org>
date Thu, 07 Sep 2006 18:12:40 +0200
parents a2e587651c79
children 8089f22fdb46
line diff
     1.1 --- a/client.c	Thu Sep 07 17:53:40 2006 +0200
     1.2 +++ b/client.c	Thu Sep 07 18:12:40 2006 +0200
     1.3 @@ -414,19 +414,13 @@
     1.4  void
     1.5  unmanage(Client *c)
     1.6  {
     1.7 -	Client *tc, *fc;
     1.8 -	Window trans;
     1.9  	XGrabServer(dpy);
    1.10  	XSetErrorHandler(xerrordummy);
    1.11  
    1.12  	detach(c);
    1.13  	if(sel == c) {
    1.14 -		XGetTransientForHint(dpy, c->win, &trans);
    1.15 -		if(trans && (tc = getclient(trans)) && isvisible(tc))
    1.16 -			fc = tc;
    1.17 -		else
    1.18 -			fc = getnext(clients);
    1.19 -		focus(fc);
    1.20 +		for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
    1.21 +		focus(sel);
    1.22  	}
    1.23  
    1.24  	XUngrabButton(dpy, AnyButton, AnyModifier, c->win);