summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-08 08:19:54 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-08 08:19:54 +0200
commit0925dd588c6879916c8a9ded1e680963b093b068 (patch)
tree5815385a168c5b74fefbff9899d2a26564bd5e97 /client.c
parent6f20315dff5de33e9ff9d3e6856769bccc4a6548 (diff)
applied sanders patch of not manipulating sel1.5
Diffstat (limited to 'client.c')
-rw-r--r--client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/client.c b/client.c
index 49229a7..6524c06 100644
--- a/client.c
+++ b/client.c
@@ -414,14 +414,16 @@ togglemax(Arg *arg)
void
unmanage(Client *c)
{
+ Client *nc;
+
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
detach(c);
detachstack(c);
if(sel == c) {
- for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
- focus(sel);
+ for(nc = stack; nc && !isvisible(nc); nc = nc->snext);
+ focus(nc);
}
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);