This commit is contained in:
bakkeby 2020-03-23 16:15:40 +01:00
parent 7bc3cf765e
commit ceed6813d3

View File

@ -4,6 +4,7 @@ focusstack(const Arg *arg)
int i = stackpos(arg); int i = stackpos(arg);
Client *c, *p; Client *c, *p;
snprintf(selmon->ltsymbol, sizeof selmon->ltsymbol, "%d", n);
if (i < 0) if (i < 0)
return; return;
@ -59,16 +60,16 @@ stackpos(const Arg *arg)
return i; return i;
} }
else if (ISINC(arg->i)) { else if (ISINC(arg->i)) {
if(!selmon->sel) if (!selmon->sel)
return -1; return -1;
for (i = 0, c = selmon->clients; c != selmon->sel; i += ISVISIBLE(c) ? 1 : 0, c = c->next); for (i = 0, c = selmon->clients; c != selmon->sel; i += ISVISIBLE(c) ? 1 : 0, c = c->next);
for (n = i; c; n += ISVISIBLE(c) ? 1 : 0, c = c->next); for (n = i; c; n += ISVISIBLE(c) ? 1 : 0, c = c->next);
return MOD(i + GETINC(arg->i), n); return MOD(i + GETINC(arg->i), n);
} }
else if (arg->i < 0) { else if (arg->i < 0) {
for(i = 0, c = selmon->clients; c; i += ISVISIBLE(c) ? 1 : 0, c = c->next); for (i = 0, c = selmon->clients; c; i += ISVISIBLE(c) ? 1 : 0, c = c->next);
return MAX(i + arg->i, 0); return MAX(i + arg->i, 0);
} }
else else
return arg->i; return arg->i;
} }