fixed column layout obscuring on running wmiirc again

This commit is contained in:
Anselm R. Garbe 2006-03-11 21:48:02 +01:00
parent e5ea2fb4fd
commit c0cf389d84
6 changed files with 13 additions and 17 deletions

View File

@ -15,20 +15,14 @@ alloc_area(Tag *t)
Area *a = cext_emallocz(sizeof(Area));
a->tag = t;
a->id = id++;
update_area_geometry(a);
a->rect = rect;
a->rect.height = rect.height - brect.height;
t->area = (Area **)cext_array_attach((void **)t->area, a, sizeof(Area *), &t->areasz);
t->sel = t->narea;
t->narea++;
return a;
}
void
update_area_geometry(Area *a)
{
a->rect = rect;
a->rect.height -= brect.height;
}
void
destroy_area(Area *a)
{
@ -332,7 +326,7 @@ arrange_tag(Tag *t, Bool updategeometry)
for(i = 1; i < t->narea; i++) {
Area *a = t->area[i];
if(updategeometry) {
update_area_geometry(a);
a->rect.height = rect.height - brect.height;
a->rect.x = (i - 1) * width;
a->rect.width = width;
}

View File

@ -62,11 +62,17 @@ update_bar_geometry()
barpmap = XCreatePixmap(dpy, barwin, brect.width, brect.height, DefaultDepth(dpy, screen));
XSync(dpy, False);
draw_bar();
for(i = 0; i < ntag; i++)
for(i = 0; i < ntag; i++) {
for(j = 1; j < tag[i]->narea; j++) {
update_area_geometry(tag[i]->area[j]);
arrange_area(tag[i]->area[j]);
Area *a = tag[i]->area[j];
a->rect.height = rect.height - brect.height;
arrange_area(a);
}
for(j = 0; j < tag[i]->area[0]->nframe; j++) {
Frame *f = tag[i]->area[0]->frame[j];
resize_client(f->client, &f->rect, nil, False);
}
}
}
void

View File

@ -432,7 +432,7 @@ resize_client(Client *c, XRectangle *r, XPoint *pt, Bool ignore_xcall)
{
Frame *f = c->frame[c->sel];
if((area2index(f->area) > 0) && pt)
if(area2index(f->area))
resize_area(c, r, pt);
else
f->rect = *r;

View File

@ -1357,7 +1357,6 @@ xwrite(IXPConn *c, Fcall *fcall)
XFreeFont(dpy, xfont);
xfont = blitz_getfont(dpy, def.font);
update_bar_geometry();
resize_all_clients();
break;
case FsFmode:
if(!i2)

View File

@ -122,11 +122,9 @@ match_tags(Client *c)
rules = parse(def.rules, &n);
c->tags[0] = 0;
tags = match(rules, n, c->name);
fprintf(stderr, "match_tags tags=%s c->name=%s\n", tags, c->name);
if(strlen(tags))
cext_strlcat(c->tags, tags, sizeof(c->tags));
tags = match(rules, n, c->classinst);
fprintf(stderr, "match_tags tags=%s c->name=%s\n", tags, c->name);
if(strlen(tags))
cext_strlcat(c->tags, tags, sizeof(c->tags));

View File

@ -213,7 +213,6 @@ Area *alloc_area(Tag *t);
void destroy_area(Area *a);
int area2index(Area *a);
int aid2index(Tag *t, unsigned short id);
void update_area_geometry(Area *a);
void select_area(Area *a, char *arg);
void send2area(Area *to, Area *from, Client *c);
void attach_toarea(Area *a, Client *c);