summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 2c45858..e592be9 100644
--- a/dwm.c
+++ b/dwm.c
@@ -2451,8 +2451,10 @@ view(const Arg *arg)
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
selmon->pertag->prevtag = selmon->pertag->curtag;
- if (arg->ui == ~0)
+ if (arg->ui == ~0) {
selmon->pertag->curtag = 0;
+ selmon->tagset[selmon->seltags] ^= SPTAGMASK;
+ }
else {
for (i = 0; !(arg->ui & 1 << i); i++) ;
selmon->pertag->curtag = i + 1;