wmii

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

commit 612a498140a42383b965064ee463c14300656312
parent feafe7bda60351694fe04eaed31525c475b40a66
Author: Sander van Dijk <sander@wmii.de>
Date:   Tue, 25 Apr 2006 22:52:42 +0200

fixes some cornercase columnscale issues 


Diffstat:
cmd/wm/area.c | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/cmd/wm/area.c b/cmd/wm/area.c @@ -18,7 +18,8 @@ Area * create_area(View *v) { static unsigned short id = 1; - unsigned int w; + unsigned int w, i, xoff = 0; + int wdiff; Area *a = nil; if(v->area.size > 1) { @@ -35,6 +36,17 @@ create_area(View *v) if(v->area.size > 1) scale_view(v, rect.width - w); + for(i = 1; i < v->area.size; i++) { + Area *b = v->area.data[i]; + b->rect.x = xoff; + b->rect.y = 0; + b->rect.height = rect.height - brect.height; + if(b->rect.width < MIN_COLWIDTH) + b->rect.width = MIN_COLWIDTH; + else if((wdiff = b->rect.x + b->rect.width - (rect.width - w) + (v->area.size - 1 - i) * MIN_COLWIDTH) > 0) + b->rect.width -= wdiff; + xoff += b->rect.width; + } a = cext_emallocz(sizeof(Area)); a->view = v; a->id = id++;