From a2f2e7d992e29a3dea4fca1dee949124a71da4e4 Mon Sep 17 00:00:00 2001 From: odrling Date: Wed, 20 Apr 2022 19:13:43 +0200 Subject: [PATCH 18/27] sendmon: keeptag patch --- dwm.c | 2 ++ patches.def.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/dwm.c b/dwm.c index 794fab7..48a5fe9 100644 --- a/dwm.c +++ b/dwm.c @@ -3305,11 +3305,13 @@ sendmon(Client *c, Monitor *m) #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH 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 index 092bc46..d2909a5 100644 --- a/patches.def.h +++ b/patches.def.h @@ -1012,6 +1012,10 @@ */ #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.37.2