From 4c76c1e41ce0f3d48bac61993e71adbc6239bba1 Mon Sep 17 00:00:00 2001 From: Bakkeby Date: Mon, 10 Jan 2022 11:28:06 +0100 Subject: [PATCH] Adding desktop patch --- dwm.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dwm.c b/dwm.c index a96f33c..5c76f0b 100644 --- a/dwm.c +++ b/dwm.c @@ -1743,12 +1743,14 @@ toggletag(const Arg *arg) void toggleview(const Arg *arg) { + Monitor *m; unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK); if (newtagset) { - selmon->tagset[selmon->seltags] = newtagset; + for (m = mons; m; m = m->next) + m->tagset[m->seltags] = newtagset; focus(NULL); - arrange(selmon); + arrange(NULL); } } @@ -2041,13 +2043,16 @@ updatewmhints(Client *c) void view(const Arg *arg) { + Monitor *m; if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) return; - selmon->seltags ^= 1; /* toggle sel tagset */ + for (m = mons; m; m = m->next) + m->seltags ^= 1; /* toggle sel tagset */ if (arg->ui & TAGMASK) - selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; + for (m = mons; m; m = m->next) + m->tagset[m->seltags] = arg->ui & TAGMASK; focus(NULL); - arrange(selmon); + arrange(NULL); } Client * -- 2.19.1