[gnome-documents/gnome-3-2] window: move maximized checks at the saving point



commit 1b957e1f0365e414d33e5960aebd606bc95177b9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 29 18:38:51 2011 -0400

    window: move maximized checks at the saving point
    
    So that we get it right also when quitting.

 src/mainWindow.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index de5aedc..b7e7166 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -96,6 +96,12 @@ MainWindow.prototype = {
     },
 
     _saveWindowGeometry: function() {
+        let window = this.window.get_window();
+        let state = window.get_state();
+
+        if (state & Gdk.WindowState.MAXIMIZED)
+            return;
+
         // GLib.Variant.new() can handle arrays just fine
         let size = this.window.get_size();
         let variant = GLib.Variant.new ('ai', size);
@@ -110,12 +116,6 @@ MainWindow.prototype = {
         if (Global.modeController.getFullscreen())
             return;
 
-        let window = widget.get_window();
-        let state = window.get_state();
-
-        if (state & Gdk.WindowState.MAXIMIZED)
-            return;
-
         if (this._configureId != 0) {
             Mainloop.source_remove(this._configureId);
             this._configureId = 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]