From 0d1a1edaaaefdb149f26636071d47af160aa0836 Mon Sep 17 00:00:00 2001 From: Dale Whittaker Date: Sun, 22 Feb 2009 14:42:27 +0100 Subject: [PATCH] Save the normal window size, not the maximized size --- midori/midori-browser.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index b488052c..d0f52b17 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3025,9 +3025,15 @@ midori_browser_window_state_event_cb (MidoriBrowser* browser, static gboolean midori_browser_alloc_timeout (MidoriBrowser* browser) { - g_object_set (browser->settings, - "last-window-width", GTK_WIDGET (browser)->allocation.width, - "last-window-height", GTK_WIDGET (browser)->allocation.height, NULL); + GtkWidget* widget = GTK_WIDGET (browser); + GdkWindowState state = gdk_window_get_state (widget->window); + + if (!(state & + (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))) + g_object_set (browser->settings, + "last-window-width", widget->allocation.width, + "last-window-height", widget->allocation.height, NULL); + browser->alloc_timeout = 0; return FALSE; } -- 2.39.5