commit ed3fe6663a9c3a052965fa7692e3008bf8a56bb0
parent eee799a3a701437348df60af4092b338ee2f7921
Author: Sander van Dijk <sander@wmii.de>
Date: Sun, 19 Mar 2006 20:07:02 +0100
prevent columns from wandering off of the screen due to inc-handling
(because a->rect.x != f->rect.x and a->rect.width != f->rect.width)
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmd/wm/area.c b/cmd/wm/area.c
@@ -412,8 +412,8 @@ drop_resize(Frame *f, XRectangle *new)
new->width = min;
}
west->rect.width = new->x - west->rect.x;
- a->rect.width += f->rect.x - new->x;
- a->rect.x = new->x;
+ a->rect.width += a->rect.x - (new->x - (f->rect.x - a->rect.x));
+ a->rect.x = new->x - (f->rect.x - a->rect.x);
match_horiz(west, &west->rect);
match_horiz(a, &a->rect);
relax_area(west);
@@ -425,8 +425,8 @@ drop_resize(Frame *f, XRectangle *new)
new->width = min;
east->rect.width -= new->x + new->width - east->rect.x;
east->rect.x = new->x + new->width;
- a->rect.x = new->x;
- a->rect.width = new->width;
+ a->rect.x = new->x - (f->rect.x - a->rect.x);
+ a->rect.width = new->width + (f->rect.x - a->rect.x);
match_horiz(a, &a->rect);
match_horiz(east, &east->rect);
relax_area(east);