X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=dwm.c;h=85292a9989775bc9d472a87801f989c037c438c3;hb=79ecbeca7e4ca6d614bf233e7bc95d273df6e3b4;hp=8ae4c0e8fc7c0573a661140ced2463d751b01aae;hpb=cf98ea2a9ce0b8ccbb3bbb510421c48279a1b280;p=dwm.git 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