Index: eog-window.c
===================================================================
--- eog-window.c	(revision 3716)
+++ eog-window.c	(working copy)
@@ -125,6 +125,7 @@ struct _EogWindowPrivate {
         GtkWidget           *layout;
         GtkWidget           *cbox;
         GtkWidget           *view;
+        GtkWidget           *frame;
         GtkWidget           *thumbview;
         GtkWidget           *statusbar;
         GtkWidget           *nav;
@@ -383,7 +384,6 @@ eog_window_collection_mode_changed_cb (G
 {
 	EogWindowPrivate *priv;
 	GConfEntry *mode_entry;
-	GtkWidget *frame;
 	EogThumbNavMode mode = EOG_THUMB_NAV_MODE_ONE_ROW;
 	gint position = 0;
 	gboolean resizable = FALSE;
@@ -417,12 +417,10 @@ eog_window_collection_mode_changed_cb (G
 	priv->collection_position = position;
 	priv->collection_resizable = resizable;
 
-	frame = priv->view->parent;
-
-	g_object_ref (frame);
+	g_object_ref (priv->frame);
 	g_object_ref (priv->nav);
 
-	gtk_container_remove (GTK_CONTAINER (priv->layout), frame);
+	gtk_container_remove (GTK_CONTAINER (priv->layout), priv->frame);
 	gtk_container_remove (GTK_CONTAINER (priv->layout), priv->nav);
 
 	gtk_widget_destroy (priv->layout);
@@ -436,11 +434,11 @@ eog_window_collection_mode_changed_cb (G
 			priv->layout = gtk_vpaned_new ();
 
 			if (position == 0) {
-				gtk_paned_pack1 (GTK_PANED (priv->layout), frame, TRUE, FALSE);
+				gtk_paned_pack1 (GTK_PANED (priv->layout), priv->frame, TRUE, FALSE);
 				gtk_paned_pack2 (GTK_PANED (priv->layout), priv->nav, FALSE, TRUE);
 			} else {
 				gtk_paned_pack1 (GTK_PANED (priv->layout), priv->nav, FALSE, TRUE);
-				gtk_paned_pack2 (GTK_PANED (priv->layout), frame, TRUE, FALSE);
+				gtk_paned_pack2 (GTK_PANED (priv->layout), priv->frame, TRUE, FALSE);
 			}
 		} else {
 			mode = EOG_THUMB_NAV_MODE_ONE_ROW;
@@ -448,11 +446,11 @@ eog_window_collection_mode_changed_cb (G
 			priv->layout = gtk_vbox_new (FALSE, 2);
 
 			if (position == 0) {
-				gtk_box_pack_start (GTK_BOX (priv->layout), frame, TRUE, TRUE, 0);
+				gtk_box_pack_start (GTK_BOX (priv->layout), priv->frame, TRUE, TRUE, 0);
 				gtk_box_pack_start (GTK_BOX (priv->layout), priv->nav, FALSE, FALSE, 0);
 			} else {
 				gtk_box_pack_start (GTK_BOX (priv->layout), priv->nav, FALSE, FALSE, 0);
-				gtk_box_pack_start (GTK_BOX (priv->layout), frame, TRUE, TRUE, 0);
+				gtk_box_pack_start (GTK_BOX (priv->layout), priv->frame, TRUE, TRUE, 0);
 			}
 		}
 		break;
@@ -466,9 +464,9 @@ eog_window_collection_mode_changed_cb (G
 
 			if (position == 1) {
 				gtk_paned_pack1 (GTK_PANED (priv->layout), priv->nav, FALSE, TRUE);
-				gtk_paned_pack2 (GTK_PANED (priv->layout), frame, TRUE, FALSE);
+				gtk_paned_pack2 (GTK_PANED (priv->layout), priv->frame, TRUE, FALSE);
 			} else {
-				gtk_paned_pack1 (GTK_PANED (priv->layout), frame, TRUE, FALSE);
+				gtk_paned_pack1 (GTK_PANED (priv->layout), priv->frame, TRUE, FALSE);
 				gtk_paned_pack2 (GTK_PANED (priv->layout), priv->nav, FALSE, TRUE);
 			}
 		} else {
@@ -478,9 +476,9 @@ eog_window_collection_mode_changed_cb (G
 
 			if (position == 1) {
 				gtk_box_pack_start (GTK_BOX (priv->layout), priv->nav, FALSE, FALSE, 0);
-				gtk_box_pack_start (GTK_BOX (priv->layout), frame, TRUE, TRUE, 0);
+				gtk_box_pack_start (GTK_BOX (priv->layout), priv->frame, TRUE, TRUE, 0);
 			} else {
-				gtk_box_pack_start (GTK_BOX (priv->layout), frame, TRUE, TRUE, 0);
+				gtk_box_pack_start (GTK_BOX (priv->layout), priv->frame, TRUE, TRUE, 0);
 				gtk_box_pack_start (GTK_BOX (priv->layout), priv->nav, FALSE, FALSE, 0);
 			}
 		}
@@ -1856,10 +1854,6 @@ eog_window_run_fullscreen (EogWindow *wi
 	g_assert (GTK_IS_WIDGET (menubar));
 	gtk_widget_hide (menubar);
 
-	g_object_set (G_OBJECT (gtk_widget_get_parent (priv->view)),
-		      "shadow-type", GTK_SHADOW_NONE,
-		      NULL);
-
 	g_signal_connect (window->priv->view,
 			  "motion-notify-event",
 			  G_CALLBACK (fullscreen_motion_notify_cb),
@@ -1895,6 +1889,10 @@ eog_window_run_fullscreen (EogWindow *wi
 
 	gtk_widget_grab_focus (window->priv->view);
 
+	g_object_ref (window->priv->frame);
+	gtk_container_remove (GTK_CONTAINER (window->priv->layout), window->priv->frame);
+	gtk_widget_reparent (window->priv->view, window->priv->layout);
+
 	gtk_window_fullscreen (GTK_WINDOW (window));
 	eog_window_update_fullscreen_popup (window);
 
@@ -1926,10 +1924,6 @@ eog_window_stop_fullscreen (EogWindow *w
 		slideshow_clear_timeout (window);
 	}
 	
-	g_object_set (G_OBJECT (gtk_widget_get_parent (priv->view)),
-		      "shadow-type", GTK_SHADOW_IN,
-		      NULL);
-
 	g_signal_handlers_disconnect_by_func (priv->view,
 					      (gpointer) fullscreen_motion_notify_cb,
 					      window);
@@ -1946,6 +1940,11 @@ eog_window_stop_fullscreen (EogWindow *w
 	
 	eog_scroll_view_set_zoom_upscale (EOG_SCROLL_VIEW (priv->view), FALSE);
 
+	gtk_widget_reparent (window->priv->view, window->priv->frame);
+	g_object_unref (window->priv->frame);
+	gtk_container_add (GTK_CONTAINER (window->priv->layout), window->priv->frame);
+
+	gtk_widget_show (window->priv->frame);
 	gtk_window_unfullscreen (GTK_WINDOW (window));
 
 	if (slideshow) {
@@ -3331,7 +3330,6 @@ eog_window_construct_ui (EogWindow *wind
 	GtkWidget *menubar;
 	GtkWidget *toolbar;
 	GtkWidget *popup;
-	GtkWidget *frame;
 
 	GConfEntry *entry;
 
@@ -3461,13 +3459,13 @@ eog_window_construct_ui (EogWindow *wind
 			  G_CALLBACK (view_zoom_changed_cb), 
 			  window);
 
-	frame = gtk_widget_new (GTK_TYPE_FRAME, 
+	priv->frame = gtk_widget_new (GTK_TYPE_FRAME, 
 				"shadow-type", GTK_SHADOW_IN, 
 				NULL);
 
-	gtk_container_add (GTK_CONTAINER (frame), priv->view);
+	gtk_container_add (GTK_CONTAINER (priv->frame), priv->view);
 
-	gtk_box_pack_start_defaults (GTK_BOX (priv->layout), frame);
+	gtk_box_pack_start_defaults (GTK_BOX (priv->layout), priv->frame);
 
 	priv->thumbview = eog_thumb_view_new ();
 
