summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-tree-view-drag-dest.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-15 23:26:05 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-15 23:26:05 +0100
commit3c796cdf6020ac59cbcaca103453501292423c71 (patch)
tree1cb80a4771c7df62438a7d77f68ce9cfed8284b3 /libcaja-private/caja-tree-view-drag-dest.c
parent50970d1bb15d1f9c682e92dda345e59cfcf5330f (diff)
downloadcaja-3c796cdf6020ac59cbcaca103453501292423c71.tar.bz2
caja-3c796cdf6020ac59cbcaca103453501292423c71.tar.xz
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
Diffstat (limited to 'libcaja-private/caja-tree-view-drag-dest.c')
-rw-r--r--libcaja-private/caja-tree-view-drag-dest.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libcaja-private/caja-tree-view-drag-dest.c b/libcaja-private/caja-tree-view-drag-dest.c
index accf7bb5..405ec141 100644
--- a/libcaja-private/caja-tree-view-drag-dest.c
+++ b/libcaja-private/caja-tree-view-drag-dest.c
@@ -102,6 +102,10 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
{
GdkRectangle visible_rect;
GtkAdjustment *vadjustment;
+#if GTK_CHECK_VERSION(3, 0, 0)
+ GdkDeviceManager *manager;
+ GdkDevice *pointer;
+#endif
GdkWindow *window;
int y;
int offset;
@@ -111,11 +115,16 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
#if GTK_CHECK_VERSION(3, 0, 0)
vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE(tree_view));
+
+ manager = gdk_display_get_device_manager (gtk_widget_get_display (GTK_WIDGET (tree_view)));
+ pointer = gdk_device_manager_get_client_pointer (manager);
+ gdk_window_get_device_position (window, pointer,
+ NULL, &y, NULL);
#else
vadjustment = gtk_tree_view_get_vadjustment (tree_view);
-#endif
gdk_window_get_pointer (window, NULL, &y, NULL);
+#endif
y += gtk_adjustment_get_value (vadjustment);