[gimp/gtk3-port: 230/237] app: use gdk_device_get_position() instead of gdk_display_get_pointer()



commit 14887034c4916e5d27c7d9b3f57bc1362ec4c083
Author: Michael Natterer <mitch gimp org>
Date:   Mon Mar 28 20:51:17 2011 +0200

    app: use gdk_device_get_position() instead of gdk_display_get_pointer()

 app/gui/gui-vtable.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/app/gui/gui-vtable.c b/app/gui/gui-vtable.c
index 2207a6f..cb903b0 100644
--- a/app/gui/gui-vtable.c
+++ b/app/gui/gui-vtable.c
@@ -248,10 +248,14 @@ gui_get_display_name (Gimp *gimp,
     }
   else
     {
-      gint x, y;
+      GdkDeviceManager *device_manager;
+      GdkDevice        *device;
+      gint              x, y;
 
-      gdk_display_get_pointer (gdk_display_get_default (),
-                               &screen, &x, &y, NULL);
+      device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
+      device = gdk_device_manager_get_client_pointer (device_manager);
+
+      gdk_device_get_position (device, &screen, &x, &y);
       monitor = gdk_screen_get_monitor_at_point (screen, x, y);
     }
 



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