summaryrefslogtreecommitdiffstats
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
parentreally small changes to dwm.1 (diff)
downloaddwm-0925dd588c6879916c8a9ded1e680963b093b068.tar.gz
dwm-0925dd588c6879916c8a9ded1e680963b093b068.zip
applied sanders patch of not manipulating sel
-rw-r--r--client.c6
-rw-r--r--view.c8
2 files changed, 8 insertions, 6 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)
414void 414void
415unmanage(Client *c) 415unmanage(Client *c)
416{ 416{
417 Client *nc;
418
417 XGrabServer(dpy); 419 XGrabServer(dpy);
418 XSetErrorHandler(xerrordummy); 420 XSetErrorHandler(xerrordummy);
419 421
420 detach(c); 422 detach(c);
421 detachstack(c); 423 detachstack(c);
422 if(sel == c) { 424 if(sel == c) {
423 for(sel = stack; sel && !isvisible(sel); sel = sel->snext); 425 for(nc = stack; nc && !isvisible(nc); nc = nc->snext);
424 focus(sel); 426 focus(nc);
425 } 427 }
426 428
427 XUngrabButton(dpy, AnyButton, AnyModifier, c->win); 429 XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
diff --git a/view.c b/view.c
index 5cbab08..3e78661 100644
--- a/view.c
+++ b/view.c
@@ -77,8 +77,8 @@ dofloat(Arg *arg)
77 ban(c); 77 ban(c);
78 } 78 }
79 if(!sel || !isvisible(sel)) { 79 if(!sel || !isvisible(sel)) {
80 for(sel = stack; sel && !isvisible(sel); sel = sel->snext); 80 for(c = stack; c && !isvisible(c); c = c->snext);
81 focus(sel); 81 focus(c);
82 } 82 }
83 restack(); 83 restack();
84} 84}
@@ -141,8 +141,8 @@ dotile(Arg *arg)
141 ban(c); 141 ban(c);
142 } 142 }
143 if(!sel || !isvisible(sel)) { 143 if(!sel || !isvisible(sel)) {
144 for(sel = stack; sel && !isvisible(sel); sel = sel->snext); 144 for(c = stack; c && !isvisible(c); c = c->snext);
145 focus(sel); 145 focus(c);
146 } 146 }
147 restack(); 147 restack();
148} 148}