diff options
author | emersion <contact@emersion.fr> | 2018-06-06 08:47:04 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-06-06 08:47:04 +0100 |
commit | ed89a2432885d7b6cd403d7f304d3b28ea991410 (patch) | |
tree | 8d68fa8860ff025c40ee038d79b997535193a5c0 | |
parent | 7366e1ced972f495a87eaff81706a83b5de56cf1 (diff) |
box: fix wlr_box_intersection
-rw-r--r-- | types/wlr_box.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_box.c b/types/wlr_box.c index f8fe9dfe..ada6a733 100644 --- a/types/wlr_box.c +++ b/types/wlr_box.c @@ -46,8 +46,8 @@ bool wlr_box_intersection(const struct wlr_box *box_a, int x1 = fmax(box_a->x, box_b->x); int y1 = fmax(box_a->y, box_b->y); - int x2 = fmin(box_a->x + box_a->width - 1, box_b->x + box_b->width - 1); - int y2 = fmin(box_a->y + box_a->height - 1, box_b->y + box_b->height - 1); + int x2 = fmin(box_a->x + box_a->width, box_b->x + box_b->width); + int y2 = fmin(box_a->y + box_a->height, box_b->y + box_b->height); dest->x = x1; dest->y = y1; |