From f55083ff83d130e53eb11f58713c380eb0f794b2 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 30 Oct 2004 20:39:13 +0000 Subject: Fix restoring window size on crash recovery by moving the setting of the 2004-10-30 Christian Persch * lib/ephy-state.c: (ephy_state_window_set_size): * src/ephy-session.c: (write_window_geometry), (int_from_string), (restore_geometry), (ephy_session_load): Fix restoring window size on crash recovery by moving the setting of the size before the initial show which occurs from ephy_shell_new_tab from parse_embed. Fixes bug #156881. --- lib/ephy-state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ephy-state.c') diff --git a/lib/ephy-state.c b/lib/ephy-state.c index 32e4f1c48..04fa76d83 100644 --- a/lib/ephy-state.c +++ b/lib/ephy-state.c @@ -124,8 +124,7 @@ ensure_states (void) static void ephy_state_window_set_size (GtkWidget *window, EphyNode *node) { - int width; - int height; + int width, height, w = -1, h = -1; gboolean maximize, size; width = ephy_node_get_property_int (node, EPHY_NODE_STATE_PROP_WIDTH); @@ -133,7 +132,8 @@ ephy_state_window_set_size (GtkWidget *window, EphyNode *node) maximize = ephy_node_get_property_boolean (node, EPHY_NODE_STATE_PROP_MAXIMIZE); size = ephy_node_get_property_boolean (node, EPHY_NODE_STATE_PROP_SIZE); - if (size) + gtk_window_get_default_size (GTK_WINDOW (window), &w, &h); + if (size && w == -1 && h == -1) { GdkScreen *screen; int screen_width, screen_height; -- cgit v1.2.3