+ 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.
+ */
+void
+ev_application_open_uri_at_dest (EvApplication *application,
+ const char *uri,
+ GdkScreen *screen,
+ EvLinkDest *dest,
+ EvWindowRunMode mode,
+ const gchar *search_string,
+ guint timestamp)
+{
+ EvWindow *ev_window;
+
+ g_return_if_fail (uri != NULL);
+
+ if (application->uri && strcmp (application->uri, uri) != 0) {
+ /* spawn a new evince process */
+ ev_spawn (uri, screen, dest, mode, search_string, timestamp);
+ return;
+ } else {
+#ifdef ENABLE_DBUS
+ GHashTable *args = build_args (screen, dest, mode, search_string);
+ gboolean ret;
+
+ /* Register the uri or send OpenURI to
+ * remote instance if already registered
+ */
+ ret = ev_application_register_uri (application, uri, args, timestamp);
+ g_hash_table_destroy (args);
+ if (!ret)
+ return;
+#endif /* ENABLE_DBUS */
+
+ ev_window = ev_application_get_empty_window (application, screen);
+ if (!ev_window)
+ ev_window = EV_WINDOW (ev_window_new ());