From: Anselm R. Garbe Date: Thu, 7 Sep 2006 16:12:40 +0000 (+0200) Subject: simplified unmanage X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=commitdiff_plain;h=8aa860d270467ac941d48f6e6905bb7eecf0a8be simplified unmanage --- diff --git a/client.c b/client.c index 3578beb..71ef677 100644 --- a/client.c +++ b/client.c @@ -414,19 +414,13 @@ togglemax(Arg *arg) 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);