Index: lib/ephy-state.c
===================================================================
--- lib/ephy-state.c	(revisione 7189)
+++ lib/ephy-state.c	(copia locale)
@@ -49,7 +49,8 @@
 	EPHY_NODE_STATE_PROP_POSITION_Y = 7,
 	EPHY_NODE_STATE_PROP_SIZE = 8,
 	EPHY_NODE_STATE_PROP_POSITION = 9,
-	EPHY_NODE_STATE_PROP_ACTIVE = 10
+	EPHY_NODE_STATE_PROP_ACTIVE = 10,
+	EPHY_NODE_STATE_PROP_CENTER = 11
 };
 
 static EphyNode *states = NULL;
@@ -165,7 +166,7 @@
 	GdkScreen *screen;
 	int x, y;
 	int screen_width, screen_height;
-	gboolean maximize, size;
+	gboolean maximize, size, center;
 
 	g_return_if_fail (GTK_IS_WINDOW (window));
 
@@ -174,9 +175,10 @@
 
 	maximize = ephy_node_get_property_boolean (node, EPHY_NODE_STATE_PROP_MAXIMIZE);
 	size = ephy_node_get_property_boolean (node, EPHY_NODE_STATE_PROP_POSITION);
+	center = ephy_node_get_property_boolean (node, EPHY_NODE_STATE_PROP_CENTER);
 
-	/* Don't set the position of the window if it is maximized */
-	if ((!maximize) && size)
+	/* Don't set the position of the window if it is maximized or centered */
+	if ((!maximize) && (!center) && size)
 	{
 		x = ephy_node_get_property_int (node, EPHY_NODE_STATE_PROP_POSITION_X);
 		y = ephy_node_get_property_int (node, EPHY_NODE_STATE_PROP_POSITION_Y);
@@ -191,6 +193,10 @@
 			gtk_window_move (GTK_WINDOW (window), x, y);
 		}
 	}
+	else if ((!maximize) && center)
+	{
+		gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER_ALWAYS);
+	}
 }
 
 static void
@@ -273,6 +279,13 @@
 	{
 		ephy_state_window_save_position (widget, node);
 	}
+	
+	if (flags & EPHY_STATE_WINDOW_INITIALLY_CENTERED)
+	{
+		ephy_node_set_property_boolean (node,
+						EPHY_NODE_STATE_PROP_CENTER,
+						TRUE);
+	}
 }
 
 static gboolean
@@ -335,6 +348,12 @@
 		   and default_height. */
 		ephy_state_save_position (node, 0, 0);
         }
+	
+	if (flags & EPHY_STATE_WINDOW_INITIALLY_CENTERED)
+	{
+		ephy_node_set_property_boolean (node, EPHY_NODE_STATE_PROP_CENTER,
+						TRUE);
+	}
 
 	return node;
 }
Index: lib/ephy-state.h
===================================================================
--- lib/ephy-state.h	(revisione 7189)
+++ lib/ephy-state.h	(copia locale)
@@ -31,7 +31,8 @@
 {
 	EPHY_STATE_WINDOW_SAVE_NONE = 0,
 	EPHY_STATE_WINDOW_SAVE_SIZE = 1 << 0,
-	EPHY_STATE_WINDOW_SAVE_POSITION = 1 << 1
+	EPHY_STATE_WINDOW_SAVE_POSITION = 1 << 1,
+	EPHY_STATE_WINDOW_INITIALLY_CENTERED = 1 << 2
 } EphyStateWindowFlags;
 
 void  ephy_state_add_window	(GtkWidget *window,
Index: src/bookmarks/ephy-bookmarks-editor.c
===================================================================
--- src/bookmarks/ephy-bookmarks-editor.c	(revisione 7189)
+++ src/bookmarks/ephy-bookmarks-editor.c	(copia locale)
@@ -1935,7 +1935,9 @@
 	ephy_state_add_window (GTK_WIDGET(editor),
 			       "bookmarks_editor",
 			       450, 400, FALSE,
-			       EPHY_STATE_WINDOW_SAVE_SIZE | EPHY_STATE_WINDOW_SAVE_POSITION);
+				   EPHY_STATE_WINDOW_SAVE_SIZE | 
+				   EPHY_STATE_WINDOW_SAVE_POSITION |
+				   EPHY_STATE_WINDOW_INITIALLY_CENTERED);
 	ephy_state_add_paned  (GTK_WIDGET (hpaned),
 			       "bookmarks_paned",
 			       130);
Index: src/ephy-history-window.c
===================================================================
--- src/ephy-history-window.c	(revisione 7189)
+++ src/ephy-history-window.c	(copia locale)
@@ -1359,7 +1359,9 @@
 	ephy_state_add_window (GTK_WIDGET (editor),
 			       "history_window",
 		               450, 400, FALSE,
-			       EPHY_STATE_WINDOW_SAVE_SIZE | EPHY_STATE_WINDOW_SAVE_POSITION);
+			       EPHY_STATE_WINDOW_SAVE_SIZE |
+			       EPHY_STATE_WINDOW_SAVE_POSITION |
+			       EPHY_STATE_WINDOW_INITIALLY_CENTERED);
 	ephy_state_add_paned  (GTK_WIDGET (hpaned),
 			       "history_paned",
 		               130);
