[gtk+/multitouch: 16/121] gtk: Do not use deprecated APIs on press-and-hold



commit d3d7bf32b1cec8a1cb00c7be055d6aec05cdc66d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 28 21:04:06 2011 +0200

    gtk: Do not use deprecated APIs on press-and-hold

 gtk/gtkwidget.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 80c6a9e..2415641 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7016,8 +7016,8 @@ gtk_widget_press_and_hold_motion_notify (GtkWidget        *widget,
       gint x, y;
       guint cursor_size;
 
-      gdk_window_get_pointer (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
-                              &x, &y, NULL);
+      gdk_window_get_device_position (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
+                                      data->device, &x, &y, NULL);
       cursor_size = gdk_display_get_default_cursor_size (gtk_widget_get_display (widget));
       gtk_window_move (GTK_WINDOW (data->popup),
                        x - cursor_size / 2,
@@ -7102,8 +7102,8 @@ gtk_widget_press_and_hold_begin_animation_timeout (gpointer user_data)
     {
       gtk_widget_set_state_flags (GTK_WIDGET (data->popup),
                                   GTK_STATE_FLAG_ACTIVE, FALSE);
-      gdk_window_get_pointer (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
-                              &x, &y, NULL);
+      gdk_window_get_device_position (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
+                                      data->device, &x, &y, NULL);
       cursor_size = gdk_display_get_default_cursor_size (gtk_widget_get_display (widget));
       gtk_window_move (GTK_WINDOW (data->popup),
                        x - cursor_size / 2,



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