diff options
| author | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2026-01-16 20:34:22 +0000 |
|---|---|---|
| committer | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2026-01-16 20:34:22 +0000 |
| commit | 8c72b7fafafe5c7005b732ccc6b446f7c4f12caf (patch) | |
| tree | 34ece46d29d9e2380c5f61e80d943a1d748bbbda | |
| parent | b743a893d2be4b4beeec450f8d40b16165d9ad61 (diff) | |
actually fix swapfocus
| -rw-r--r-- | dwm.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2077,13 +2077,15 @@ swapfocus() { int n = 0; Client *c; - for(c = selmon->clients; c && c != prevclient; c = c->next); for(c = selmon->clients; c; c = c->next) if(ISVISIBLE(c)) n++;; if(n == 2) { Arg arg = {.i = +1}; focusstack(&arg); - } else if(c == prevclient) - focus(prevclient); + } else { + for(c = selmon->clients; c && c != prevclient; c = c->next); + if(c == prevclient) + focus(prevclient); + } XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2); } |
