aboutsummaryrefslogtreecommitdiffstats
path: root/view.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-07 17:53:40 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-07 17:53:40 +0200
commit15abade2720158fd35dcf59aa2cd5cbb325a849c (patch)
treef6255eca60e10fe5c305054e6adac07274c5a513 /view.c
parent7ab8c8728168234f6b9e99d1be384323d1246b10 (diff)
downloaddwm-15abade2720158fd35dcf59aa2cd5cbb325a849c.tar.gz
using a global stack for focus recovery on arrange() - seems to work great
Diffstat (limited to 'view.c')
-rw-r--r--view.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/view.c b/view.c
index 9ee4c78..5cbab08 100644
--- a/view.c
+++ b/view.c
@@ -76,8 +76,10 @@ dofloat(Arg *arg)
else
ban(c);
}
- if(!sel || !isvisible(sel))
- focus(getnext(clients));
+ if(!sel || !isvisible(sel)) {
+ for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
+ focus(sel);
+ }
restack();
}
@@ -138,8 +140,10 @@ dotile(Arg *arg)
else
ban(c);
}
- if(!sel || !isvisible(sel))
- focus(getnext(clients));
+ if(!sel || !isvisible(sel)) {
+ for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
+ focus(sel);
+ }
restack();
}
@@ -227,7 +231,7 @@ restack()
XRaiseWindow(dpy, sel->win);
XRaiseWindow(dpy, sel->twin);
}
- if(arrange != dofloat)
+ if(arrange != dofloat)
for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
XLowerWindow(dpy, c->twin);
XLowerWindow(dpy, c->win);
remember that computers suck.