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
commit 8306102dac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

7
dwm.c
View file

@ -951,8 +951,13 @@ expose(XEvent *e)
void
focus(Client *c)
{
if (!c || !ISVISIBLE(c))
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) {