summaryrefslogtreecommitdiff
path: root/dwl/dwl-patches/patches/singletagset-sticky
diff options
context:
space:
mode:
Diffstat (limited to 'dwl/dwl-patches/patches/singletagset-sticky')
-rwxr-xr-xdwl/dwl-patches/patches/singletagset-sticky/README.md13
-rwxr-xr-xdwl/dwl-patches/patches/singletagset-sticky/singletagset-sticky.patch27
2 files changed, 40 insertions, 0 deletions
diff --git a/dwl/dwl-patches/patches/singletagset-sticky/README.md b/dwl/dwl-patches/patches/singletagset-sticky/README.md
new file mode 100755
index 0000000..f1f9fd3
--- /dev/null
+++ b/dwl/dwl-patches/patches/singletagset-sticky/README.md
@@ -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)
diff --git a/dwl/dwl-patches/patches/singletagset-sticky/singletagset-sticky.patch b/dwl/dwl-patches/patches/singletagset-sticky/singletagset-sticky.patch
new file mode 100755
index 0000000..ce6a40c
--- /dev/null
+++ b/dwl/dwl-patches/patches/singletagset-sticky/singletagset-sticky.patch
@@ -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
+