+static void
+ev_window_stop_presentation (EvWindow *window)
+{
+ if (! ev_view_get_presentation (EV_VIEW (window->priv->view)))
+ return;
+
+ g_object_set (G_OBJECT (window->priv->scrolled_window),
+ "shadow-type", GTK_SHADOW_IN,
+ NULL);
+ ev_view_set_presentation (EV_VIEW (window->priv->view), FALSE);
+ gtk_window_unfullscreen (GTK_WINDOW (window));
+ ev_window_update_presentation_action (window);
+ update_chrome_visibility (window);
+}
+
+static void
+ev_window_cmd_view_presentation (GtkAction *action, EvWindow *window)
+{
+ gboolean presentation;
+
+ g_return_if_fail (EV_IS_WINDOW (window));
+
+ presentation = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+ if (presentation) {
+ ev_window_run_presentation (window);
+ } else {
+ ev_window_stop_presentation (window);
+ }
+}
+
+static gboolean
+ev_window_state_event (GtkWidget *widget, GdkEventWindowState *event)
+{
+ EvWindow *window = EV_WINDOW (widget);