x11: Fix in_rectangle computation

A point is not in a rectangle when it's at the x + width coordinate.
This commit is contained in:
Benjamin Otte 2010-11-23 00:56:33 +01:00
parent 1bb6f48bb3
commit ac4609ecc9

View File

@ -106,11 +106,11 @@ impl_coord_in_window (GdkWindow *window,
int impl_y) int impl_y)
{ {
if (impl_x < window->abs_x || if (impl_x < window->abs_x ||
impl_x > window->abs_x + window->width) impl_x >= window->abs_x + window->width)
return FALSE; return FALSE;
if (impl_y < window->abs_y || if (impl_y < window->abs_y ||
impl_y > window->abs_y + window->height) impl_y >= window->abs_y + window->height)
return FALSE; return FALSE;
return TRUE; return TRUE;