diff options
| author | Luke Smith <[email protected]> | 2021-12-11 08:33:07 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-11 08:33:07 -0500 |
| commit | 8306102dacd7a1b2830124e9abf28821ca5a35e8 (patch) | |
| tree | 7784d5e20d454345c5b37c5f679798062471d5bb /dwm.c | |
| parent | Merge pull request #167 from monosans/tabs (diff) | |
| parent | Fix small edge cases (diff) | |
| download | seiwm-8306102dacd7a1b2830124e9abf28821ca5a35e8.tar.xz seiwm-8306102dacd7a1b2830124e9abf28821ca5a35e8.zip | |
Merge pull request #181 from ethanv2/sticky-patch-1
Don't automatically focus sticky windows
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -951,8 +951,13 @@ 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); if (c) { |