From 461fab0bb7432a222577f74f5807fc830c192ba8 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 26 Jun 2016 21:07:26 +0200 Subject: 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 --- libcaja-private/caja-icon-container.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ( -- cgit v1.2.1