diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2024-09-03 20:43:26 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2024-09-03 20:43:26 +0400 |
commit | 1e9122f27e58d20fe7207a091c43c8b862e6791c (patch) | |
tree | e9cb17c126f8533bd3636ea760b72cc0674d4ed5 | |
parent | 059830df7684a630dfbcd9c2cc4b8bf0458dc791 (diff) |
bug fix and code cleaned in focusstack
-rw-r--r-- | dwm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -869,8 +869,8 @@ focusstack(const Arg *arg) if (arg->i > 0) { c = selmon->sel->next; - int i = 2; - while (i) { + + for (int i = 0; i < 2; i++) { for (;c ; c = c->next) { if (!ISVISIBLE(c)) continue; @@ -883,8 +883,8 @@ focusstack(const Arg *arg) c = selmon->clients; else break; - i--; } + } else { for (i = selmon->clients; i != selmon->sel; i = i->next) { if(!focusfloat && ISVISIBLE(i) && !i->isfloating) |