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



commit c583015dc080662f3e47afbbee32b41615b34704
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 9b51c0d..4d2aba8 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -6997,8 +6997,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,
@@ -7083,8 +7083,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]