From 8f2079b925edd825ffbfadfc9a062a8747e8ca72 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Tue, 7 May 2024 22:06:36 +0200 Subject: [PATCH] fix: make sure sticky stays on same monitor until moved explicitely --- dwl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index 835558d..b3f64e1 100644 --- a/dwl.c +++ b/dwl.c @@ -71,8 +71,8 @@ #define MIN(A, B) ((A) < (B) ? (A) : (B)) #define ROUND(X) ((int)((X < 0) ? (X - 0.5) : (X + 0.5))) #define CLEANMASK(mask) (mask & ~WLR_MODIFIER_CAPS) -#define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags]) || (C)->issticky) -#define SVISIBLEON(C, M) ((M) && (C)->mon && ((C)->tags & (M)->tagset[(M)->seltags])) +#define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & ((M)->tagset[(M)->seltags]) || C->issticky)) +#define SVISIBLEON(C, M) ((M) && (C)->mon && ((C)->tags & ((M)->tagset[(M)->seltags])) && (!(C)->issticky || (C)->mon == (M))) #define LENGTH(X) (sizeof X / sizeof X[0]) #define END(A) ((A) + LENGTH(A)) #define TAGMASK ((1u << TAGCOUNT) - 1) -- 2.48.1