aboutsummaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-06-19 09:11:11 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-06-19 09:11:11 +0100
commit79ecbeca7e4ca6d614bf233e7bc95d273df6e3b4 (patch)
tree2c787ea4c9637b33d4476d77dbf45c29236d636e /dwm.c
parentcf98ea2a9ce0b8ccbb3bbb510421c48279a1b280 (diff)
downloaddwm-79ecbeca7e4ca6d614bf233e7bc95d273df6e3b4.tar.gz
non-zero
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index 8ae4c0e..85292a9 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1496,14 +1496,22 @@ togglemax(const Arg *arg) {
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
remember that computers suck.