fix attached

2008/6/18, yy <[EMAIL PROTECTED]>:
> I don't know how nobody found this one sooner. It has happened to me
>  just after the announcement, but there is a bug in 5.0. You shouldn't
>  be able to toggle tags when there is only one selected (a client
>  without tags will be lost for ever after an arrange...). In other
>  words, toggleview and toggletag need one more check.
>  OTOH, I have been using it for some time without even noticing it. I'm
>  attaching my config.h, just in case somebody is interested in the
>  pointer wrapping function.
>
>
>
>
>  --
>
>
>  - yiyus || JGL .
>
>


-- 
http://www.gnuffy.org - Real Community Distro
http://www.gnuffy.org/index.php/GnuEm - Gnuffy on Ipaq (Codename Peggy)
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();
 }
 

Reply via email to