commit 4c995b291123f5e27a281002bb4f926861f04d42 parent c2f458aa9fdfbe4dea367f99efc3217b29a62d40 Author: Sander van Dijk <sander@wmii.de> Date: Tue, 28 Mar 2006 20:17:44 +0200 small drop_resize change, handle a cornercase nicer Diffstat:
| cmd/wm/area.c | | | 10 | ++++++---- |
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/cmd/wm/area.c b/cmd/wm/area.c @@ -432,10 +432,12 @@ AfterHorizontal: goto AfterVertical; /* validate (and trim if necessary) vertical resize */ - if(new->height < (f->rect.height < min_height ? f->rect.height : min_height)) { + if(new->height < min_height) { + if(f->rect.height < min_height && (new->y == f->rect.y || new->y + new->height == f->rect.y + f->rect.height)) + goto AfterVertical; if(new->y + new->height == f->rect.y + f->rect.height) - new->y = f->rect.y + f->rect.height - (f->rect.height < min_height ? f->rect.height : min_height); - new->height = f->rect.height < min_height ? f->rect.height : min_height; + new->y = f->rect.y + f->rect.height - min_height; + new->height = min_height; } if(north && (new->y != f->rect.y)) if(new->y < 0 || new->y < (north->rect.y + min_height)) { @@ -446,7 +448,7 @@ AfterHorizontal: if((new->y + new->height) > (south->rect.y + south->rect.height - min_height)) new->height = (south->rect.y + south->rect.height - min_height) - new->y; } - if(new->height < (f->rect.height < min_height ? f->rect.height : min_height)) + if(new->height < min_height) goto AfterVertical; /* vertical resize */