Mercurial > dwm-meillo
diff view.c @ 446:a2e587651c79
using a global stack for focus recovery on arrange() - seems to work great
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Thu, 07 Sep 2006 17:53:40 +0200 |
parents | 548084f8d92e |
children | 728c9089b079 |
line wrap: on
line diff
--- a/view.c Thu Sep 07 09:26:01 2006 +0200 +++ b/view.c Thu Sep 07 17:53:40 2006 +0200 @@ -76,8 +76,10 @@ 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 @@ 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 @@ 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);