summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-26 21:07:26 +0200
committerraveit65 <[email protected]>2016-07-04 14:40:52 +0200
commit461fab0bb7432a222577f74f5807fc830c192ba8 (patch)
treecb7a5fa466552f29570d3c65d04f6529a84fc214 /libcaja-private
parent18334383985b6379387b87c8e873562b36fb4bd0 (diff)
downloadcaja-461fab0bb7432a222577f74f5807fc830c192ba8.tar.bz2
caja-461fab0bb7432a222577f74f5807fc830c192ba8.tar.xz
GTK+-3.20 caja-icon-container: use GdkSeat operations
Some GdkDisplay operations have been deprecated in GDK 3.20. This commit replaces the deprecated code with new GdkSeat operations. https://bugzilla.gnome.org/show_bug.cgi?id=762235 taken from: https://git.gnome.org/browse/nautilus/commit/?id=202a66f
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-icon-container.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 914cfb5b..91f8b82d 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -2755,6 +2755,10 @@ rubberband_timeout_callback (gpointer data)
double world_x, world_y;
int x_scroll, y_scroll;
int adj_x, adj_y;
+#if GTK_CHECK_VERSION(3, 20, 0)
+ GdkDisplay *display;
+ GdkSeat *seat;
+#endif
gboolean adj_changed;
GtkAllocation allocation;
@@ -2784,8 +2788,14 @@ rubberband_timeout_callback (gpointer data)
band_info->last_adj_y = adj_y;
adj_changed = TRUE;
}
+#if GTK_CHECK_VERSION(3, 20, 0)
+ display = gtk_widget_get_display (widget);
+ seat = gdk_display_get_default_seat (display);
-#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_window_get_device_position (gtk_widget_get_window (widget),
+ gdk_seat_get_pointer (seat),
+ &x, &y, NULL);
+#elif GTK_CHECK_VERSION (3, 0, 0)
gdk_window_get_device_position (gtk_widget_get_window (widget),
gdk_device_manager_get_client_pointer (
gdk_display_get_device_manager (