wmii

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

commit c0cf389d846feb9794dc9754facffaf538fa7c39
parent e5ea2fb4fd3401400d324e5ae108fdc5f52995e6
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Sat, 11 Mar 2006 21:48:02 +0100

fixed column layout obscuring on running wmiirc again


Diffstat:
cmd/wm/area.c | 12+++---------
cmd/wm/bar.c | 12+++++++++---
cmd/wm/client.c | 2+-
cmd/wm/fs.c | 1-
cmd/wm/rule.c | 2--
cmd/wm/wm.h | 1-
6 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/cmd/wm/area.c b/cmd/wm/area.c @@ -15,7 +15,8 @@ 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++; @@ -23,13 +24,6 @@ alloc_area(Tag *t) } void -update_area_geometry(Area *a) -{ - a->rect = rect; - a->rect.height -= brect.height; -} - -void destroy_area(Area *a) { unsigned int i; @@ -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; } diff --git a/cmd/wm/bar.c b/cmd/wm/bar.c @@ -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 diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -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; diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c @@ -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) diff --git a/cmd/wm/rule.c b/cmd/wm/rule.c @@ -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)); diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h @@ -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);