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



commit 84d6406f9095b11a83734e05c8eec9fc4084bc58
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 3876f76..fbc92c2 100644
--- a/app/gui/gui-vtable.c
+++ b/app/gui/gui-vtable.c
@@ -252,10 +252,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]