skip minimized windows when going through stack
@@ -1732,16 +1732,16 @@ focusstack(const Arg *arg)
if (!selmon->sel || (selmon->sel->isfullscreen && !selmon->sel->isfakefullscreen))
return;
if (arg->i > 0) {
- for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next);
+ for (c = selmon->sel->next; c && (!ISVISIBLE(c) || HIDDEN(c)); c = c->next);
if (!c)
- for (c = selmon->clients; c && !ISVISIBLE(c); c = c->next);
+ for (c = selmon->clients; c && (!ISVISIBLE(c) || HIDDEN(c)); c = c->next);
} else {
for (i = selmon->clients; i != selmon->sel; i = i->next)
- if (ISVISIBLE(i))
+ if (ISVISIBLE(i) && !HIDDEN(i))
c = i;
if (!c)
for (; i; i = i->next)
- if (ISVISIBLE(i))
+ if (ISVISIBLE(i) && !HIDDEN(i))
c = i;
}
if (c) {
