Merge pull request #181 from ethanv2/sticky-patch-1

Don't automatically focus sticky windows
This commit is contained in:
Luke Smith
2021-12-11 08:33:07 -05:00
committed by GitHub

9
dwm.c
View File

@@ -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) {