# HG changeset patch # User Anselm R. Garbe # Date 1157645560 -7200 # Node ID 16c4e4c5fb15488f31287fd95bb05730dd062c04 # Parent a2e587651c79ac651e165c17b845a5ba099e0b6a simplified unmanage diff -r a2e587651c79 -r 16c4e4c5fb15 client.c --- a/client.c Thu Sep 07 17:53:40 2006 +0200 +++ b/client.c Thu Sep 07 18:12:40 2006 +0200 @@ -414,19 +414,13 @@ void unmanage(Client *c) { - Client *tc, *fc; - Window trans; XGrabServer(dpy); XSetErrorHandler(xerrordummy); detach(c); if(sel == c) { - XGetTransientForHint(dpy, c->win, &trans); - if(trans && (tc = getclient(trans)) && isvisible(tc)) - fc = tc; - else - fc = getnext(clients); - focus(fc); + for(sel = stack; sel && !isvisible(sel); sel = sel->snext); + focus(sel); } XUngrabButton(dpy, AnyButton, AnyModifier, c->win);