odrling-overlay/x11-wm/dwm/files/0018-sendmon-keeptag-patch.patch

47 lines
1.3 KiB
Diff
Raw Normal View History

2022-06-21 11:46:07 +00:00
From 75eefd66d379c26925f147e9d4f8d1054d36b3e3 Mon Sep 17 00:00:00 2001
2022-06-21 11:36:40 +00:00
From: odrling <florianbadie@odrling.xyz>
Date: Wed, 20 Apr 2022 19:13:43 +0200
Subject: [PATCH 18/26] sendmon: keeptag patch
---
dwm.c | 2 ++
patches.def.h | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/dwm.c b/dwm.c
2022-06-21 11:46:07 +00:00
index 8d8ca19..6b66f77 100644
2022-06-21 11:36:40 +00:00
--- a/dwm.c
+++ b/dwm.c
2022-06-21 11:46:07 +00:00
@@ -3268,11 +3268,13 @@ sendmon(Client *c, Monitor *m)
#if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH
2022-06-21 11:36:40 +00:00
if (!(c->tags & SPTAGMASK))
#endif // SCRATCHPADS_PATCH
+ #if !SENDMON_KEEPTAGS
#if EMPTYVIEW_PATCH
c->tags = (m->tagset[m->seltags] ? m->tagset[m->seltags] : 1);
#else
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
#endif // EMPTYVIEW_PATCH
+ #endif // SENDMON_KEEPTAGS
#if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH
attachx(c);
#else
diff --git a/patches.def.h b/patches.def.h
2022-06-21 11:46:07 +00:00
index b2082fe..ee260d0 100644
2022-06-21 11:36:40 +00:00
--- a/patches.def.h
+++ b/patches.def.h
2022-06-21 11:46:07 +00:00
@@ -963,6 +963,10 @@
2022-06-21 11:36:40 +00:00
*/
#define SENDMON_KEEPFOCUS_PATCH 0
+/* This patch allow clients to keep their current tags when sent to another monitor
+ */
+#define SENDMON_KEEPTAGS 1
+
/* This patch allows border pixels to be changed during runtime.
* https://dwm.suckless.org/patches/setborderpx/
*/
--
2.35.1