]> spindle.queued.net Git - midori/commitdiff
Save the normal window size, not the maximized size
authorDale Whittaker <dayul@users.sf.net>
Sun, 22 Feb 2009 13:42:27 +0000 (14:42 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 22 Feb 2009 13:42:27 +0000 (14:42 +0100)
midori/midori-browser.c

index b488052cade436b662344a9277f5a2630add2734..d0f52b17a0202c448d7e1f3d61a568c927cd6043 100644 (file)
@@ -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;
 }