diff options
author | rsc <devnull@localhost> | 2005-10-31 18:45:06 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-10-31 18:45:06 +0000 |
commit | d5233ccb3ac0850ca335ec58fb96bd0ce41709be (patch) | |
tree | 9b2ec38978e119577551c862b8c5a90b378d87ad /src | |
parent | 33dc4226a8c21e640bc1b4d7c56f41e2f0bdcc3f (diff) | |
download | plan9port-d5233ccb3ac0850ca335ec58fb96bd0ce41709be.tar.gz plan9port-d5233ccb3ac0850ca335ec58fb96bd0ce41709be.tar.bz2 plan9port-d5233ccb3ac0850ca335ec58fb96bd0ce41709be.zip |
More prep.
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/acme/cols.c | 6 | ||||
-rw-r--r-- | src/cmd/acme/wind.c | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c index 76c318ff..f375404f 100644 --- a/src/cmd/acme/cols.c +++ b/src/cmd/acme/cols.c @@ -269,7 +269,7 @@ colsort(Column *c) r1.max.y = r1.min.y+Border; draw(screen, r1, display->black, nil, ZP); r.min.y = r1.max.y; - y = winresize(w, r, FALSE, TRUE); + y = winresize(w, r, FALSE, i==c->nw-1); } free(rp); free(c->w); @@ -386,7 +386,7 @@ colgrow(Column *c, Window *w, int but) r.max.y = y2; h = w->body.fr.font->height; if(Dy(r) < Dy(w->tagtop)+1+h+Border) - r.max.y = r.min.y+Dy(w->tagtop)+1+h+Border; + r.max.y = r.min.y + Dy(w->tagtop)+1+h+Border; /* draw window */ winresize(w, r, c->safe, TRUE); if(i < c->nw-1){ @@ -402,7 +402,7 @@ colgrow(Column *c, Window *w, int but) v = c->w[j]; r = v->r; r.min.y = y1; - r.max.y = y1+Dy(v->tag.all); + r.max.y = y1+Dy(v->tagtop); if(nl[j]) r.max.y += 1 + nl[j]*v->body.fr.font->height; y1 = winresize(v, r, c->safe, j+1==c->nw); diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c index 84c518e8..bceb41ee 100644 --- a/src/cmd/acme/wind.c +++ b/src/cmd/acme/wind.c @@ -32,10 +32,10 @@ wininit(Window *w, Window *clone, Rectangle r) w->ctlfid = ~0; w->utflastqid = -1; r1 = r; - + w->tagtop = r; w->tagtop.max.y = r.min.y + font->height; - + r1.max.y = r1.min.y + w->taglines*font->height; incref(&reffont.ref); f = fileaddtext(nil, &w->tag); @@ -127,8 +127,9 @@ winresize(Window *w, Rectangle r, int safe, int keepextra) r1 = r; r1.max.y = min(r.max.y, r1.min.y + w->taglines*font->height); y = r1.max.y; - if(1 || !safe || !eqrect(w->tag.fr.r, r1)){ - y = textresize(&w->tag, r1, TRUE); + if(1 || !safe || !eqrect(w->tag.all, r1)){ + textresize(&w->tag, r1, TRUE); + y = w->tag.fr.r.max.y; b = button; if(w->body.file->mod && !w->isdir && !w->isscratch) b = modbutton; @@ -140,7 +141,7 @@ winresize(Window *w, Rectangle r, int safe, int keepextra) r1 = r; r1.min.y = y; - if(1 || !safe || !eqrect(w->body.fr.r, r1)){ + if(!safe || !eqrect(w->body.all, r1)){ if(y+1+w->body.fr.font->height <= r.max.y){ /* room for one line */ r1.min.y = y; r1.max.y = y+1; |