[eog] Fix GDK deprecations
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Fix GDK deprecations
- Date: Sat, 10 Mar 2012 14:25:09 +0000 (UTC)
commit c87818df0fe3ea5a5783426011925d2e2e752b24
Author: Adrian ZgorzaÅek <a zgorzalek gmail com>
Date: Wed Feb 29 22:08:31 2012 +0100
Fix GDK deprecations
Partially fixes compiling with -Werror-deprecated.
http://bugzilla.gnome.org/show_bug.cgi?id=671402
src/eog-scroll-view.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index 0766b64..335b42f 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -1487,9 +1487,14 @@ display_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer data)
}
if (do_zoom) {
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
gint x, y;
- gdk_window_get_pointer (gtk_widget_get_window (widget),
+ 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,
&x, &y, NULL);
set_zoom (view, zoom, TRUE, x, y);
}
@@ -1673,7 +1678,7 @@ eog_scroll_view_motion_event (GtkWidget *widget, GdkEventMotion *event, gpointer
return FALSE;
if (event->is_hint)
- gdk_window_get_pointer (gtk_widget_get_window (GTK_WIDGET (priv->display)), &x, &y, &mods);
+ gdk_window_get_device_position (gtk_widget_get_window (GTK_WIDGET (priv->display)), event->device, &x, &y, &mods);
else {
x = event->x;
y = event->y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]