aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-10-31 04:39:13 +0800
committerChristian Persch <chpe@src.gnome.org>2004-10-31 04:39:13 +0800
commitf55083ff83d130e53eb11f58713c380eb0f794b2 (patch)
tree053bd43a10e61f6e5a6fea931faf95d7b8a6a8f2 /lib
parent4c41745e525a7fc35f29622e382ec7f881cc2e50 (diff)
downloadgsoc2013-epiphany-f55083ff83d130e53eb11f58713c380eb0f794b2.tar
gsoc2013-epiphany-f55083ff83d130e53eb11f58713c380eb0f794b2.tar.gz
gsoc2013-epiphany-f55083ff83d130e53eb11f58713c380eb0f794b2.tar.bz2
gsoc2013-epiphany-f55083ff83d130e53eb11f58713c380eb0f794b2.tar.lz
gsoc2013-epiphany-f55083ff83d130e53eb11f58713c380eb0f794b2.tar.xz
gsoc2013-epiphany-f55083ff83d130e53eb11f58713c380eb0f794b2.tar.zst
gsoc2013-epiphany-f55083ff83d130e53eb11f58713c380eb0f794b2.zip
Fix restoring window size on crash recovery by moving the setting of the
2004-10-30 Christian Persch <chpe@cvs.gnome.org> * 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.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-state.c6
1 files changed, 3 insertions, 3 deletions
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;