[gtk+/client-side-windows: 222/284] Fix coords returned by _gdk_windowing_window_get_pointer, fixes scribble demo



commit c36625879ba893f1af572d27ef0f3bc03aad3212
Author: Richard Hult <richard imendio com>
Date:   Sat Jan 31 21:16:27 2009 +0100

    Fix coords returned by _gdk_windowing_window_get_pointer, fixes scribble demo
---
 gdk/quartz/gdkwindow-quartz.c |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index a2541d7..c91d06a 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -1784,20 +1784,11 @@ _gdk_windowing_window_get_pointer (GdkDisplay      *display,
       nswindow = impl->toplevel;
 
       point = [nswindow mouseLocationOutsideOfEventStream];
+
       x_tmp = point.x;
       y_tmp = private->height - point.y;
-    }
 
-  /* The coords are relative to the toplevel of the passed in window
-   * at this point, make them relative to the passed in window:
-   */
-  private = GDK_WINDOW_OBJECT (window);
-  while (private != toplevel)
-    {
-      x_tmp -= private->x;
-      y_tmp -= private->y;
-
-      private = private->parent;
+      window = toplevel;
     }
 
   found_window = _gdk_quartz_window_find_child (window, x_tmp, y_tmp);



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