summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Riemann <[email protected]>2016-12-29 15:10:46 +0100
committerraveit65 <[email protected]>2017-04-26 20:30:34 +0200
commitc308ea07559e7f86f5dd2073d4af8660afb37d72 (patch)
tree045f2c9aab1ff933be087cccb41cf700baba4b98
parent92e293f22e2dc022945f3555f0385d0066755d5e (diff)
downloadeom-c308ea07559e7f86f5dd2073d4af8660afb37d72.tar.bz2
eom-c308ea07559e7f86f5dd2073d4af8660afb37d72.tar.xz
EomScrollView: Switch from GtkDeviceManager to GdkSeat
taken from: https://git.gnome.org/browse/eog/commit/?id=3de58ce
-rw-r--r--src/eom-scroll-view.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c
index 0a321d0..7099c6b 100644
--- a/src/eom-scroll-view.c
+++ b/src/eom-scroll-view.c
@@ -913,15 +913,24 @@ display_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer data)
}
if (do_zoom) {
+#if GTK_CHECK_VERSION (3, 20, 0)
+ GdkSeat *seat;
+#else
GdkDeviceManager *device_manager;
+#endif
GdkDevice *device;
gint x, y;
- device_manager = gdk_display_get_device_manager (gtk_widget_get_display(widget));
+#if GTK_CHECK_VERSION (3, 20, 0)
+ seat = gdk_display_get_default_seat (gtk_widget_get_display (widget));
+ device = gdk_seat_get_pointer (seat);
+#else
+ device_manager = gdk_display_get_device_manager (gtk_widget_get_display (widget));
device = gdk_device_manager_get_client_pointer (device_manager);
+#endif
gdk_window_get_device_position (gtk_widget_get_window (widget), device,
- &x, &y, NULL);
+ &x, &y, NULL);
set_zoom (view, zoom, TRUE, x, y);
}