summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
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 (