[gimp/gtk3-port: 249/251] app: use gdk_device_get_position() instead of gdk_display_get_pointer()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 249/251] app: use gdk_device_get_position() instead of gdk_display_get_pointer()
- Date: Mon, 28 Mar 2011 19:43:39 +0000 (UTC)
commit 9e81d51edadc8075ac0423fa5ee30e5d2fd81b0d
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]