+static void
+ev_application_open_uri_in_window (EvApplication *application,
+ const char *uri,
+ EvWindow *ev_window,
+ GdkScreen *screen,
+ EvLinkDest *dest,
+ EvWindowRunMode mode,
+ const gchar *search_string,
+ guint timestamp)
+{
+ if (screen) {
+ ev_stock_icons_set_screen (screen);
+ gtk_window_set_screen (GTK_WINDOW (ev_window), screen);
+ }
+
+ /* We need to load uri before showing the window, so
+ we can restore window size without flickering */
+ ev_window_open_uri (ev_window, uri, dest, mode, search_string);
+
+ if (!GTK_WIDGET_REALIZED (GTK_WIDGET (ev_window)))
+ gtk_widget_realize (GTK_WIDGET (ev_window));
+
+#ifdef GDK_WINDOWING_X11
+ if (timestamp <= 0)
+ timestamp = gdk_x11_get_server_time (GTK_WIDGET (ev_window)->window);
+ gdk_x11_window_set_user_time (GTK_WIDGET (ev_window)->window, timestamp);
+
+ ev_document_fc_mutex_lock ();
+ gtk_window_present (GTK_WINDOW (ev_window));
+ ev_document_fc_mutex_unlock ();
+#else
+ ev_document_fc_mutex_lock ();
+ gtk_window_present_with_time (GTK_WINDOW (ev_window), timestamp);
+ ev_document_fc_mutex_unlock ();
+#endif /* GDK_WINDOWING_X11 */
+}
+
+/**
+ * ev_application_open_uri_at_dest:
+ * @application: The instance of the application.
+ * @uri: The uri to be opened.
+ * @screen: Thee screen where the link will be shown.
+ * @dest: The #EvLinkDest of the document.
+ * @mode: The run mode of the window.
+ * @timestamp: Current time value.
+ */