commit c74117881e1854872e7b3620df2173ae0919c35f
parent b047fc8748a7d24b34cf0fa26a62f8937eb8cf23
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Thu, 9 Mar 2006 11:39:15 +0100
moved /class directory to /def/class, fixed bug reported by bogon (resize_all_clients())
Diffstat:
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -507,9 +507,11 @@ void
resize_all_clients()
{
unsigned int i;
- for(i = 0; i < nclient; i++)
- if(client[i]->frame[client[i]->sel]->area)
- resize_client(client[i], &client[i]->frame[client[i]->sel]->rect, 0, False);
+ for(i = 0; i < nclient; i++) {
+ Client *c = client[i];
+ if(c->nframe && c->frame[c->sel]->area)
+ resize_client(c, &c->frame[c->sel]->rect, 0, False);
+ }
}
/* convenience function */
diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c
@@ -287,7 +287,7 @@ name2type(char *name, unsigned char dir_type)
if(!strncmp(name, "def", 4))
return FsDdef;
if(!strncmp(name, "class", 6)) {
- if(dir_type == FsDroot)
+ if(dir_type == FsDdef)
return FsDclass;
else
return FsFclass;
@@ -363,7 +363,6 @@ mkqid(Qid *dir, char *wname, Qid *new)
*new = root_qid;
break;
case FsDdef:
- case FsDclass:
case FsDkeys:
case FsDtags:
case FsDclients:
@@ -373,6 +372,12 @@ mkqid(Qid *dir, char *wname, Qid *new)
new->type = IXP_QTDIR;
new->path = mkqpath(type, 0, 0, 0);
break;
+ case FsDclass:
+ if(dir_type != FsDdef)
+ return -1;
+ new->type = IXP_QTDIR;
+ new->path = mkqpath(type, 0, 0, 0);
+ break;
case FsDws:
new->type = IXP_QTDIR;
new->path = mkqpath(FsDws, ntag ? tag[sel]->id : 0, 0, 0);
@@ -977,8 +982,6 @@ xread(IXPConn *c, Fcall *fcall)
p = ixp_enc_stat(p, &stat);
fcall->count += type2stat(&stat, "clients", &m->qid);
p = ixp_enc_stat(p, &stat);
- fcall->count += type2stat(&stat, "class", &m->qid);
- p = ixp_enc_stat(p, &stat);
fcall->count += type2stat(&stat, "ws", &m->qid);
p = ixp_enc_stat(p, &stat);
break;
@@ -1042,6 +1045,8 @@ xread(IXPConn *c, Fcall *fcall)
case FsDdef:
fcall->count += type2stat(&stat, "border", &m->qid);
p = ixp_enc_stat(p, &stat);
+ fcall->count += type2stat(&stat, "class", &m->qid);
+ p = ixp_enc_stat(p, &stat);
fcall->count += type2stat(&stat, "snap", &m->qid);
p = ixp_enc_stat(p, &stat);
fcall->count += type2stat(&stat, "selcolors", &m->qid);