tapplied sanders patch of not manipulating sel - dwm - [fork] customized build of dwm, the dynamic window manager (HTM) git clone git://src.adamsgaard.dk/dwm (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 0925dd588c6879916c8a9ded1e680963b093b068 (DIR) parent 6f20315dff5de33e9ff9d3e6856769bccc4a6548 (HTM) Author: Anselm R. Garbe <arg@10kloc.org> Date: Fri, 8 Sep 2006 08:19:54 +0200 applied sanders patch of not manipulating sel Diffstat: M client.c | 6 ++++-- M view.c | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) --- (DIR) diff --git a/client.c b/client.c t@@ -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); (DIR) diff --git a/view.c b/view.c t@@ -77,8 +77,8 @@ dofloat(Arg *arg) ban(c); } if(!sel || !isvisible(sel)) { - for(sel = stack; sel && !isvisible(sel); sel = sel->snext); - focus(sel); + for(c = stack; c && !isvisible(c); c = c->snext); + focus(c); } restack(); } t@@ -141,8 +141,8 @@ dotile(Arg *arg) ban(c); } if(!sel || !isvisible(sel)) { - for(sel = stack; sel && !isvisible(sel); sel = sel->snext); - focus(sel); + for(c = stack; c && !isvisible(c); c = c->snext); + focus(c); } restack(); }