From c634c1d3bda34a34da15dbf2a6714607f8643594 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Fri, 4 Aug 2017 15:21:16 +0200 Subject: dictionary: avoid deprecated GdkDevice objects --- mate-dictionary/libgdict/gdict-defbox.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mate-dictionary') diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c index 29c304f9..69d76329 100644 --- a/mate-dictionary/libgdict/gdict-defbox.c +++ b/mate-dictionary/libgdict/gdict-defbox.c @@ -1602,14 +1602,23 @@ defbox_visibility_notify_cb (GtkWidget *text_view, GdictDefbox *defbox) { GdkDisplay *display; +#if GTK_CHECK_VERSION (3, 20, 0) + GdkSeat *seat; +#else GdkDeviceManager *device_manager; +#endif GdkDevice *pointer; gint wx, wy; gint bx, by; display = gdk_window_get_display (event->window); +#if GTK_CHECK_VERSION (3, 20, 0) + seat = gdk_display_get_default_seat (display); + pointer = gdk_seat_get_pointer (seat); +#else device_manager = gdk_display_get_device_manager (display); pointer = gdk_device_manager_get_client_pointer (device_manager); +#endif gdk_window_get_device_position (gtk_widget_get_window (text_view), pointer, &wx, &wy, NULL); gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view), -- cgit v1.2.1