[sushi/wip/cosimoc/no-clutter: 37/66] mainWindow: don't cache window size



commit 5d3292406f023980d880c3a749a5d3c1443228e2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Apr 8 22:05:10 2017 -0700

    mainWindow: don't cache window size
    
    Request resizing without caching the size; window sizing is asynchronous
    and our state is incorrect.

 src/js/ui/mainWindow.js | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index ffaf619..8993f7d 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -168,13 +168,9 @@ var MainWindow = new Lang.Class({
             return;
 
         let windowSize = this._getWindowSize();
-
-        if (this._lastWindowSize &&
-            windowSize[0] == this._lastWindowSize[0] &&
-            windowSize[1] == this._lastWindowSize[1])
+        if (windowSize[0] <= 0 || windowSize[1] <= 0)
             return;
 
-        this._lastWindowSize = windowSize;
         this.resize(windowSize[0], windowSize[1]);
     },
 


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