Hi,

How to reproduce:
1) Start wmii
2) Open up one window (terminal)
3) Run wmiir xwrite /client/sel/tags /./
4) Switch to tag 2 using Mod+2
5) wmii crashes

Proposed patch is attached, please review if this is the correct solution. In
my understanding, only floating windows were checked, but you can apply /./ to
all windows, so we need to check (and apply_tags) all windows. Feel free to
enlighten me, if I'm wrong.

Best regards,
Michael
diff -r 621b1245dc16 cmd/wmii/view.c
--- a/cmd/wmii/view.c   Sat Jan 10 17:53:19 2009 -0500
+++ b/cmd/wmii/view.c   Wed Jan 28 23:43:15 2009 +0100
@@ -125,15 +125,9 @@
        *vp = v->next;
        assert(v != v->next);
 
-       /* FIXME: Can do better */
        /* Detach frames held here by regex tags. */
-       for(a=v->floating; a; a=an) {
-               an = a->next;
-               for(f=a->frame; f; f=fn) {
-                       fn = f->anext;
-                       apply_tags(f->client, f->client->tags);
-               }
-       }
+       foreach_frame(v, s, a, f)
+               apply_tags(f->client, f->client->tags);
 
        foreach_area(v, s, a)
                area_destroy(a);

Attachment: pgpXZHUqBlmJ3.pgp
Description: PGP signature

Reply via email to