From e07af0d9049af36e1670a12deff39ea09616b6cd Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 30 May 2016 17:14:13 +0200 Subject: GTK+3 mdict defbox: do not use deprecated gdk_window_get_pointer taken from: https://git.gnome.org/browse/gnome-dictionary/commit/?id=8be0a24 --- mate-dictionary/libgdict/gdict-defbox.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mate-dictionary/libgdict') diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c index c71c6921..9dfb1aa7 100644 --- a/mate-dictionary/libgdict/gdict-defbox.c +++ b/mate-dictionary/libgdict/gdict-defbox.c @@ -1610,7 +1610,9 @@ defbox_motion_notify_cb (GtkWidget *text_view, set_cursor_if_appropriate (defbox, GTK_TEXT_VIEW (text_view), bx, by); +#if !GTK_CHECK_VERSION (3, 0, 0) gdk_window_get_pointer (gtk_widget_get_window (text_view), NULL, NULL, NULL); +#endif return FALSE; } @@ -1620,10 +1622,22 @@ defbox_visibility_notify_cb (GtkWidget *text_view, GdkEventVisibility *event, GdictDefbox *defbox) { +#if GTK_CHECK_VERSION (3, 0, 0) + GdkDisplay *display; + GdkDeviceManager *device_manager; + GdkDevice *pointer; +#endif gint wx, wy; gint bx, by; +#if GTK_CHECK_VERSION (3, 0, 0) + display = gdk_window_get_display (event->window); + device_manager = gdk_display_get_device_manager (display); + pointer = gdk_device_manager_get_client_pointer (device_manager); + gdk_window_get_device_position (gtk_widget_get_window (text_view), pointer, &wx, &wy, NULL); +#else gdk_window_get_pointer (gtk_widget_get_window (text_view), &wx, &wy, NULL); +#endif gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view), GTK_TEXT_WINDOW_WIDGET, -- cgit v1.2.1