{
Client *c, *min;
+ if((clients && clients->isfloat) || arrange == dofloat)
+ return clients; /* don't touch floating order */
for(min = c = clients; c; c = c->next)
if(c->weight < min->weight)
min = c;
return min;
}
-
static void
reorder()
{
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();
}
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();
}
Client *c;
XEvent ev;
- if(!sel)
+ if(!sel) {
+ drawstatus();
return;
+ }
if(sel->isfloat || arrange == dofloat) {
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);
if(!(c = nexttiled(c->next)))
return;
detach(c);
+ if(clients)
+ clients->prev = c;
c->next = clients;
- clients->prev = c;
clients = c;
focus(c);
arrange(NULL);