diff options
| author | Bear <bear@bengtsson.win> | 2021-12-29 03:30:54 +0000 |
|---|---|---|
| committer | Bear <bear@bengtsson.win> | 2021-12-29 03:30:54 +0000 |
| commit | a8e9c33c50152294c5fed83af9d1c71f6689c777 (patch) | |
| tree | c3c167f050d9f3b6f84730208301ef876da648db | |
| parent | 33d1943ab7b90e0e2cc74cee7c358733c3871fab (diff) | |
| -rw-r--r-- | dwm.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1930,8 +1930,11 @@ expose(XEvent *e) void focus(Client *c) { - if (!c || !ISVISIBLE(c)) - for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext); + if (!c || !ISVISIBLE(c)) { + for (c = selmon->stack; c && (!ISVISIBLE(c) || (c->issticky && !selmon->sel->issticky)); c = c->snext); + if (!c) /* No windows found; check for available stickies */ + for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext); + } if (selmon->sel && selmon->sel != c) unfocus(selmon->sel, 0, c); if (c) { |
