summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-07 18:12:40 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-07 18:12:40 +0200
commit8aa860d270467ac941d48f6e6905bb7eecf0a8be (patch)
tree2a21f16837ea664645efe16c5b112abb5d3ed98d
parentusing a global stack for focus recovery on arrange() - seems to work great (diff)
downloaddwm-8aa860d270467ac941d48f6e6905bb7eecf0a8be.tar.gz
dwm-8aa860d270467ac941d48f6e6905bb7eecf0a8be.zip
simplified unmanage
Diffstat (limited to '')
-rw-r--r--client.c10
1 files changed, 2 insertions, 8 deletions
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)
414void 414void
415unmanage(Client *c) 415unmanage(Client *c)
416{ 416{
417 Client *tc, *fc;
418 Window trans;
419 XGrabServer(dpy); 417 XGrabServer(dpy);
420 XSetErrorHandler(xerrordummy); 418 XSetErrorHandler(xerrordummy);
421 419
422 detach(c); 420 detach(c);
423 if(sel == c) { 421 if(sel == c) {
424 XGetTransientForHint(dpy, c->win, &trans); 422 for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
425 if(trans && (tc = getclient(trans)) && isvisible(tc)) 423 focus(sel);
426 fc = tc;
427 else
428 fc = getnext(clients);
429 focus(fc);
430 } 424 }
431 425
432 XUngrabButton(dpy, AnyButton, AnyModifier, c->win); 426 XUngrabButton(dpy, AnyButton, AnyModifier, c->win);