summaryrefslogtreecommitdiffstats
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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)
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);