diff -r b8329bfe5046 dwm.c --- a/dwm.c Wed Jun 18 18:22:54 2008 +0100 +++ b/dwm.c Thu Jun 19 07:55:28 2008 +0200 @@ -1496,13 +1496,13 @@ void toggletag(const Arg *arg) { - if(sel && (sel->tags ^= (arg->ui & TAGMASK))) + if(sel && (arg->ui & TAGMASK) && (sel->tags ^= (arg->ui & TAGMASK))) arrange(); } void toggleview(const Arg *arg) { - if((tagset[seltags] ^= (arg->ui & TAGMASK))) + if((arg->ui & TAGMASK) && (tagset[seltags] ^= (arg->ui & TAGMASK))) arrange(); }