diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-09-07 17:53:40 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-09-07 17:53:40 +0200 |
| commit | 15abade2720158fd35dcf59aa2cd5cbb325a849c (patch) | |
| tree | f6255eca60e10fe5c305054e6adac07274c5a513 /view.c | |
| parent | made markups in dwm.1 more consistent (diff) | |
| download | dwm-15abade2720158fd35dcf59aa2cd5cbb325a849c.tar.gz dwm-15abade2720158fd35dcf59aa2cd5cbb325a849c.zip | |
using a global stack for focus recovery on arrange() - seems to work great
Diffstat (limited to 'view.c')
| -rw-r--r-- | view.c | 14 |
1 files changed, 9 insertions, 5 deletions
| @@ -76,8 +76,10 @@ dofloat(Arg *arg) | |||
| 76 | else | 76 | else |
| 77 | ban(c); | 77 | ban(c); |
| 78 | } | 78 | } |
| 79 | if(!sel || !isvisible(sel)) | 79 | if(!sel || !isvisible(sel)) { |
| 80 | focus(getnext(clients)); | 80 | for(sel = stack; sel && !isvisible(sel); sel = sel->snext); |
| 81 | focus(sel); | ||
| 82 | } | ||
| 81 | restack(); | 83 | restack(); |
| 82 | } | 84 | } |
| 83 | 85 | ||
| @@ -138,8 +140,10 @@ dotile(Arg *arg) | |||
| 138 | else | 140 | else |
| 139 | ban(c); | 141 | ban(c); |
| 140 | } | 142 | } |
| 141 | if(!sel || !isvisible(sel)) | 143 | if(!sel || !isvisible(sel)) { |
| 142 | focus(getnext(clients)); | 144 | for(sel = stack; sel && !isvisible(sel); sel = sel->snext); |
| 145 | focus(sel); | ||
| 146 | } | ||
| 143 | restack(); | 147 | restack(); |
| 144 | } | 148 | } |
| 145 | 149 | ||
| @@ -227,7 +231,7 @@ restack() | |||
| 227 | XRaiseWindow(dpy, sel->win); | 231 | XRaiseWindow(dpy, sel->win); |
| 228 | XRaiseWindow(dpy, sel->twin); | 232 | XRaiseWindow(dpy, sel->twin); |
| 229 | } | 233 | } |
| 230 | if(arrange != dofloat) | 234 | if(arrange != dofloat) |
| 231 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { | 235 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { |
| 232 | XLowerWindow(dpy, c->twin); | 236 | XLowerWindow(dpy, c->twin); |
| 233 | XLowerWindow(dpy, c->win); | 237 | XLowerWindow(dpy, c->win); |
