From 63bab1aa8a5a2925fbccd1022f173ea68ba6663e Mon Sep 17 00:00:00 2001 From: bakkeby Date: Tue, 7 Nov 2023 17:58:45 +0100 Subject: [PATCH] sticky: prioritise non-sticky windows on focus(NULL) ref. #387 --- dwm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dwm.c b/dwm.c index 7497c65..0ffc759 100644 --- a/dwm.c +++ b/dwm.c @@ -2046,6 +2046,10 @@ focus(Client *c) if (!c || !ISVISIBLE(c)) c = getpointerclient(); #endif // FOCUSFOLLOWMOUSE_PATCH + #if STICKY_PATCH + if (!c || !ISVISIBLE(c)) + for (c = selmon->stack; c && !ISVISIBLE(c) && !c->issticky; c = c->snext); + #endif // STICKY_PATCH if (!c || !ISVISIBLE(c)) for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext); if (selmon->sel && selmon->sel != c)