From 6f813e5625bd110b581bf222de84dedc5dd239ae Mon Sep 17 00:00:00 2001 From: Rutherther Date: Tue, 7 May 2024 21:50:38 +0200 Subject: [PATCH] fix: correct behavior with other patches that change VISIBLEON This fixes problems with patches like istticky, where the sticky window would be visible on every monitor. It's not. It should be visible only on its monitor. SVIBISLBEON should always be adapted with those patches. It's used just for singletagset when looking where a window should be visible --- dwl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index 757feb3..cb064e2 100644 --- a/dwl.c +++ b/dwl.c @@ -66,7 +66,8 @@ #define MAX(A, B) ((A) > (B) ? (A) : (B)) #define MIN(A, B) ((A) < (B) ? (A) : (B)) #define CLEANMASK(mask) (mask & ~WLR_MODIFIER_CAPS) -#define VISIBLEON(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])) +#define SVISIBLEON(C, M) ((M) && (C)->mon && ((C)->tags & (M)->tagset[(M)->seltags])) #define LENGTH(X) (sizeof X / sizeof X[0]) #define END(A) ((A) + LENGTH(A)) #define TAGMASK ((1u << TAGCOUNT) - 1) @@ -554,7 +555,7 @@ attachclients(Monitor *m) } wl_list_for_each(c, &clients, link) { - if (VISIBLEON(c, m)) { + if (SVISIBLEON(c, m)) { /* if client is also visible on other tags that are displayed on * other monitors, remove these tags */ if (c->tags & utags) { -- 2.49.0