From a4ef374026fb32517922e3977ea4b9d7d1a0b621 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Tue, 1 Sep 2015 21:54:27 +0200 Subject: Gtk3: Fix GDK deprecations - deprecated gdk_window_get_pointer taken from: https://git.gnome.org/browse/eog/commit/?id=c87818d --- src/eom-scroll-view.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c index d939d35..66de49a 100644 --- a/src/eom-scroll-view.c +++ b/src/eom-scroll-view.c @@ -1505,9 +1505,20 @@ display_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer data) } if (do_zoom) { +#if GTK_CHECK_VERSION (3, 0, 0) + GdkDeviceManager *device_manager; + GdkDevice *device; +#endif gint x, y; +#if GTK_CHECK_VERSION (3, 0, 0) + device_manager = gdk_display_get_device_manager (gtk_widget_get_display(widget)); + device = gdk_device_manager_get_client_pointer (device_manager); + + gdk_window_get_device_position (gtk_widget_get_window (widget), device, +#else gdk_window_get_pointer (gtk_widget_get_window (widget), +#endif &x, &y, NULL); set_zoom (view, zoom, TRUE, x, y); } @@ -1691,7 +1702,11 @@ eom_scroll_view_motion_event (GtkWidget *widget, GdkEventMotion *event, gpointer return FALSE; if (event->is_hint) +#if GTK_CHECK_VERSION (3, 0, 0) + gdk_window_get_device_position (gtk_widget_get_window (GTK_WIDGET (priv->display)), event->device, &x, &y, &mods); +#else gdk_window_get_pointer (gtk_widget_get_window (GTK_WIDGET (priv->display)), &x, &y, &mods); +#endif else { x = event->x; y = event->y; -- cgit v1.2.1