summaryrefslogtreecommitdiff
path: root/libview/ev-view-presentation.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-24 17:14:26 +0200
committerraveit65 <[email protected]>2016-06-29 16:23:03 +0200
commitaa9a83b64ac38330991168ab799d482960e07437 (patch)
treec2004fa518b41740fd221939c581470fa464c86d /libview/ev-view-presentation.c
parente3aaf39c9ca3fa3dc3d030caef68f28b8a27b086 (diff)
downloadatril-aa9a83b64ac38330991168ab799d482960e07437.tar.bz2
atril-aa9a83b64ac38330991168ab799d482960e07437.tar.xz
GTK+-3: Use ev_document_misc_get_pointer_position() instad of deprecated gtk_widget_get_pointer()
Diffstat (limited to 'libview/ev-view-presentation.c')
-rw-r--r--libview/ev-view-presentation.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index 01a49aac..08694cc1 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -528,7 +528,11 @@ ev_view_presentation_update_current_page (EvViewPresentation *pview,
if (pview->cursor != EV_VIEW_CURSOR_HIDDEN) {
gint x, y;
+#if GTK_CHECK_VERSION(3, 0, 0)
+ ev_document_misc_get_pointer_position (GTK_WIDGET (pview), &x, &y);
+#else
gtk_widget_get_pointer (GTK_WIDGET (pview), &x, &y);
+#endif
ev_view_presentation_set_cursor_for_location (pview, x, y);
}
@@ -1219,7 +1223,11 @@ ev_view_presentation_key_press_event (GtkWidget *widget,
ev_view_presentation_goto_window_create (pview);
ev_view_presentation_goto_window_send_key_event (pview, (GdkEvent *)event);
+#if GTK_CHECK_VERSION(3, 0, 0)
+ ev_document_misc_get_pointer_position (GTK_WIDGET (pview), &x, &y);
+#else
gtk_widget_get_pointer (GTK_WIDGET (pview), &x, &y);
+#endif
gtk_window_move (GTK_WINDOW (pview->goto_window), x, y);
gtk_widget_show (pview->goto_window);
ev_view_presentation_goto_entry_grab_focus (pview);