From 3c796cdf6020ac59cbcaca103453501292423c71 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Fri, 15 Jan 2016 23:26:05 +0100 Subject: GTK3 all: don't use deprecated GDK pointer methods Use the new GdkDevice methods instead. taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-4&id=a816e00 https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-4&id=cdf858f --- libcaja-private/caja-dnd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libcaja-private/caja-dnd.c') diff --git a/libcaja-private/caja-dnd.c b/libcaja-private/caja-dnd.c index 9cfbcbc5..f1e3bb70 100644 --- a/libcaja-private/caja-dnd.c +++ b/libcaja-private/caja-dnd.c @@ -957,11 +957,22 @@ void caja_drag_autoscroll_calculate_delta (GtkWidget *widget, float *x_scroll_delta, float *y_scroll_delta) { GtkAllocation allocation; +#if GTK_CHECK_VERSION (3, 0, 0) + GdkDeviceManager *manager; + GdkDevice *pointer; +#endif int x, y; g_assert (GTK_IS_WIDGET (widget)); +#if GTK_CHECK_VERSION (3, 0, 0) + manager = gdk_display_get_device_manager (gtk_widget_get_display (widget)); + pointer = gdk_device_manager_get_client_pointer (manager); + gdk_window_get_device_position (gtk_widget_get_window (widget), pointer, + &x, &y, NULL); +#else gdk_window_get_pointer (gtk_widget_get_window (widget), &x, &y, NULL); +#endif /* Find out if we are anywhere close to the tree view edges * to see if we need to autoscroll. -- cgit v1.2.1