[gtk+] x11: Fix in_rectangle computation



commit ac4609ecc9e2a63803a17000720a02c0b9322757
Author: Benjamin Otte <otte redhat com>
Date:   Tue Nov 23 00:56:33 2010 +0100

    x11: Fix in_rectangle computation
    
    A point is not in a rectangle when it's at the x + width coordinate.

 gdk/x11/gdkdevice-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index 0618224..008e339 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -106,11 +106,11 @@ impl_coord_in_window (GdkWindow *window,
 		      int        impl_y)
 {
   if (impl_x < window->abs_x ||
-      impl_x > window->abs_x + window->width)
+      impl_x >= window->abs_x + window->width)
     return FALSE;
 
   if (impl_y < window->abs_y ||
-      impl_y > window->abs_y + window->height)
+      impl_y >= window->abs_y + window->height)
     return FALSE;
 
   return TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]