From 79ecbeca7e4ca6d614bf233e7bc95d273df6e3b4 Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Thu, 19 Jun 2008 09:11:11 +0100 Subject: non-zero --- dwm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index 8ae4c0e8..85292a99 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 -- cgit v1.2.3