singletagset-sticky: init

Patch sticky to work with singletagset
This commit is contained in:
Rutherther 2024-07-26 13:41:14 +02:00
parent c830f47254
commit 97c08710a7
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,13 @@
### Description
Makes sticky work as expected with singletagset. The sticky window will
stay on original output until you explicitely put it to a different monitor.
This patch expects both [singletagset](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/singletagset) and [sticky](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/sticky) patches to be already in
your tree committed. It applies onto them.
### Download
- [2024-07-26](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/singletagset-sticky/singletagset-sticky.patch)
- [git branch](https://codeberg.org/Rutherther/dwl/src/branch/v0.7/singletagset-sticky)
### Authors
- [Rutherther](https://codeberg.org/Rutherther)

View File

@ -0,0 +1,27 @@
From a37d65c8601a7c5b03c53bb99956da8a24952628 Mon Sep 17 00:00:00 2001
From: Rutherther <rutherther@proton.me>
Date: Fri, 19 Jul 2024 16:51:26 +0200
Subject: [PATCH] singletagset-sticky
---
dwl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dwl.c b/dwl.c
index 59e56bd..fbbdff9 100644
--- a/dwl.c
+++ b/dwl.c
@@ -73,8 +73,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 == (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)->issticky && (C)->mon == (M)))
#define LENGTH(X) (sizeof X / sizeof X[0])
#define END(A) ((A) + LENGTH(A))
#define TAGMASK ((1u << TAGCOUNT) - 1)
--
2.45.2