wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit cbc770ab041d622618de97f7e25bb23adefca18a
parent bbbe27bedceefa3be37c584149f7526821187296
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Mon,  6 Mar 2006 21:14:01 +0100

changed update_ctags policy (not calling on detach, but on destroy)


Diffstat:
cmd/wm/client.c | 2+-
cmd/wm/tag.c | 13+------------
2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -217,6 +217,7 @@ destroy_client(Client * c) XDestroyWindow(dpy, c->framewin); cext_array_detach((void **)client, c, &clientsz); nclient--; + update_ctags(); free(c); } @@ -344,7 +345,6 @@ detach_client(Client *c, Bool unmap) reparent_client(c, root, c->rect.x, c->rect.y); XUnmapWindow(dpy, c->framewin); } -/* update_ctags();*/ } Client * diff --git a/cmd/wm/tag.c b/cmd/wm/tag.c @@ -238,14 +238,6 @@ void detach_fromtag(Tag *t, Client *c, Bool unmap) { int i; - /* TODO: achieve something to remove a specific tag from client's tags */ -#if 0 - c->tags[0] = 0; - char *p = strstr(c->tags, t->name); - if(p) - memmove(p, p + strlen(t->name), strlen(p + strlen(t->name))); - fprintf(stderr, "%s %s %s\n", c->tags, t->name, p); -#endif for(i = 0; i < t->narea; i++) if(clientofarea(t->area[i], c)) detach_fromarea(t->area[i], c); @@ -256,11 +248,8 @@ attach_totag(Tag *t, Client *c) { Area *a = t->area[t->sel]; - if(!strstr(c->tags, t->name)) { - if(c->tags[0] != 0) - cext_strlcat(c->tags, " ", sizeof(c->tags)); + if(c->tags[0] == 0) cext_strlcat(c->tags, t->name, sizeof(c->tags)); - } reparent_client(c, c->framewin, c->rect.x, c->rect.y); attach_toarea(a, c); map_client(c);