wmii

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

commit 622ac75b4affbfc8499251d6a5ca00efd0ed23b7
parent fa5b4b2402b8bae8086da88f8b8ebe857183f205
Author: Kris Maglione <jg@suckless.org>
Date:   Sun, 11 Feb 2007 13:32:15 -0500

Death to increment gaps. Please comment.


Diffstat:
client.c | 12+++++++-----
column.c | 10++--------
frame.c | 2+-
3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/client.c b/client.c @@ -526,9 +526,6 @@ resize_client(Client *c, XRectangle *r) { return; } - c->rect.x = def.border; - c->rect.y = labelh(&def.font); - if(f->area->sel != f) switch(f->area->mode) { case Colmax: @@ -546,8 +543,13 @@ resize_client(Client *c, XRectangle *r) { } else { ShowWindow: - c->rect.width = f->rect.width - 2 * def.border; - c->rect.height = f->rect.height - def.border - labelh(&def.font); + c->rect.y = labelh(&def.font); + c->rect.width = f->rect.width; + c->rect.height = f->rect.height; + match_sizehints(c, &c->rect, False, NORTH|EAST); + c->rect.width -= def.border * 2; + c->rect.height -= labelh(&def.font) + def.border; + c->rect.x = (f->rect.width - c->rect.width) / 2; XMoveResizeWindow(blz.dpy, c->win, c->rect.x, c->rect.y, c->rect.width, c->rect.height); map_client(c); diff --git a/column.c b/column.c @@ -77,7 +77,6 @@ relax_column(Area *a) { for(f=a->frame; f && (hx < hdiff); f=f->anext) { unsigned int tmp = f->rect.height; f->rect.height += hx; - match_sizehints(f->client, &f->rect, f->area->floating, NORTH|EAST); hdiff -= (f->rect.height - tmp); } } @@ -87,10 +86,8 @@ relax_column(Area *a) { yoff = a->rect.y + hdiff / 2; for(f=a->frame; f; f=f->anext) { f->rect.y = yoff; - if(a->mode != Colmax || f == a->sel) { - f->rect.x = a->rect.x + (a->rect.width - f->rect.width) / 2; - yoff = f->rect.y + f->rect.height + hdiff; - } + if(a->mode != Colmax || f == a->sel) + yoff = r_south(&f->rect) + hdiff; } } @@ -154,7 +151,6 @@ arrange_column(Area *a, Bool dirty) { f->rect.y = yoff; f->rect.width = a->rect.width; yoff += f->rect.height; - match_sizehints(f->client, &f->rect, f->area->floating, NORTH|EAST); } break; case Colstack: @@ -175,8 +171,6 @@ Fallthrough: case Colmax: for(f=a->frame; f; f=f->anext) { f->rect = a->rect; - if(f == a->sel) - match_sizehints(f->client, &f->rect, f->area->floating, NORTH|EAST); } break; default: diff --git a/frame.c b/frame.c @@ -84,7 +84,7 @@ resize_frame(Frame *f, XRectangle *r) { stickycorner = get_sticky(&f->rect, r); f->rect = *r; - if((f->area->mode != Colstack) || (f->area->sel == f)) + if(f->area->floating) match_sizehints(c, &f->rect, f->area->floating, stickycorner); }