dwm.c
changeset 1288 2b839f9998c8
parent 1285 226e616bc123
child 1289 064cfe1e8f84
--- a/dwm.c	Wed Jun 18 18:22:54 2008 +0100
+++ b/dwm.c	Thu Jun 19 09:11:11 2008 +0100
@@ -1496,14 +1496,22 @@
 
 void
 toggletag(const Arg *arg) {
-	if(sel && (sel->tags ^= (arg->ui & TAGMASK)))
+	uint mask = sel->tags ^ (arg->ui & TAGMASK);
+
+	if(sel && mask) {
+		sel->tags = mask;
 		arrange();
+	}
 }
 
 void
 toggleview(const Arg *arg) {
-	if((tagset[seltags] ^= (arg->ui & TAGMASK)))
+	uint mask = tagset[seltags] ^ (arg->ui & TAGMASK);
+
+	if(mask) {
+		tagset[seltags] = mask;
 		arrange();
+	}
 }
 
 void