wmii

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

commit d083e7e243db06b9b11b973dd3615924461dc546
parent 50099397939e03184db74b58d82c7a901deb59f1
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Tue, 21 Mar 2006 18:14:50 +0100

several fixes, merges


Diffstat:
cmd/wm/fs.c | 10++++++++++
cmd/wm/tag.c | 11++++++++---
cmd/wmiir.c | 2+-
3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c @@ -401,10 +401,20 @@ mkqid(Qid *dir, char *wname, Qid *new) new->type = IXP_QTFILE; new->path = mkqpath(type, qpath_i1id(dir->path), qpath_i2id(dir->path), qpath_i3id(dir->path)); break; + case FsFtag: + if(dir_i1 == -1 || dir_type != FsDws) + return -1; + new->type = IXP_QTFILE; + new->path = mkqpath(type, qpath_i1id(dir->path), qpath_i2id(dir->path), qpath_i3id(dir->path)); + break; case FsFgeom: case FsFname: case FsFclass: + if(dir_type == FsDroot) + return -1; case FsFtags: + if(dir_type != FsDroot && dir_type != FsDGclient && dir_type != FsDclient) + return -1; if((dir_type == FsDclient) && ((dir_i1 == -1 || dir_i2 == -1 || dir_i3 == -1))) return -1; else if((dir_type == FsDGclient) && (dir_i1 == -1)) diff --git a/cmd/wm/tag.c b/cmd/wm/tag.c @@ -235,6 +235,7 @@ organize_client(Tag *t, Client *c) { unsigned int i; Bool hastag = False; + for(i = 0; i < t->ntag; i++) { if(clienthastag(c, t->tag[i])) hastag = True; @@ -242,12 +243,16 @@ organize_client(Tag *t, Client *c) } if(hastag) { - if(!clientoftag(t, c)) + if(!clientoftag(t, c)) { + fprintf(stderr, "org attach %s?\n", c->name); attach_totag(t, c); + } } else { - if(clientoftag(t, c)) + if(clientoftag(t, c)) { + fprintf(stderr, "org detach %s?\n", c->name); detach_fromtag(t, c); + } } } @@ -300,7 +305,7 @@ update_tags() nctag = nnewctag; ctagsz = newctagsz; - for(i = 0; i < nclient; i++) { + for(i = 0; ntag && (i < nclient); i++) { for(j = 0; j < ntag; j++) { Tag *t = tag[j]; if(j == sel) diff --git a/cmd/wmiir.c b/cmd/wmiir.c @@ -151,7 +151,7 @@ xls(void *result, unsigned int msize) while(p - result < msize); qsort(dir, n, sizeof(Stat), comp_stat); for(i = 0; i < n; i++) { - fprintf(stdout, "%s %s %s %5lld %s %s\n", mode2str(dir[i].mode), + fprintf(stdout, "%s %s %s %5llu %s %s\n", mode2str(dir[i].mode), dir[i].uid, dir[i].gid, dir[i].length, time2str(dir[i].mtime), dir[i].name); }