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



commit 625324beb7f196a2a795f15ec4cb3625017f0efd
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 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index 5ab8275..f4ba6d7 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -177,13 +177,9 @@ const 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]