aboutsummaryrefslogtreecommitdiff
path: root/client.c
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 /client.c
parent15abade2720158fd35dcf59aa2cd5cbb325a849c (diff)
downloaddwm-8aa860d270467ac941d48f6e6905bb7eecf0a8be.tar
dwm-8aa860d270467ac941d48f6e6905bb7eecf0a8be.tar.gz
dwm-8aa860d270467ac941d48f6e6905bb7eecf0a8be.tar.bz2
simplified unmanage
Diffstat (limited to 'client.c')
-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)
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);