wlt: toolkit: fix wlt_rect_contains() calculations
We need to check whether the point is left/atop of the rectangle, too. Otherwise, the function just doesn't make sense. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
202fa3b766
commit
83d36af4a1
@ -179,6 +179,8 @@ static inline bool wlt_rect_contains(struct wlt_rect *rect,
|
||||
unsigned int x,
|
||||
unsigned int y)
|
||||
{
|
||||
if (x < rect->x || y < rect->y)
|
||||
return false;
|
||||
if (x >= rect->x + rect->width)
|
||||
return false;
|
||||
if (y >= rect->y + rect->height)
|
||||
|
Loading…
x
Reference in New Issue
Block a user