forget what I send before, here's a real fix:

2008/6/19, Enno Gottox Boland <[EMAIL PROTECTED]>:
> 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)
>
>


-- 
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 08:08:17 2008 +0200
@@ -1496,14 +1496,22 @@
 
 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

Reply via email to