~ruther/dwl

b97893b660ec376df0d8e440a3aa45a4b4456458 — Rutherther 11 months ago 98ff132
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
1 files changed, 3 insertions(+), 2 deletions(-)

M dwl.c
M dwl.c => dwl.c +3 -2
@@ 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) {

Do not follow this link