From 0925dd588c6879916c8a9ded1e680963b093b068 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Fri, 8 Sep 2006 08:19:54 +0200 Subject: applied sanders patch of not manipulating sel --- client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client.c') 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); -- cgit v1.2.3-54-g00ecf