[gnome-shell] workspace: Invalidate the current layout when windows are added or removed



commit 8b3b91d78d9760454698a65c063b16565cd9a4c0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 22 18:20:11 2013 -0400

    workspace: Invalidate the current layout when windows are added or removed
    
    If windows are removed or added, we shouldn't keep the old layout, as it's
    not valid anymore. If windows are removed, this is especially bad, as the
    rows contain references to the removed window objects, causing crashes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698622

 js/ui/workspace.js | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 8121c69..ae6ad18 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -1257,6 +1257,7 @@ const Workspace = new Lang.Class({
         this._cursorX = x;
         this._cursorY = y;
 
+        this._currentLayout = null;
         this._repositionWindowsId = Mainloop.timeout_add(750,
             Lang.bind(this, this._delayedWindowRepositioning));
     },
@@ -1304,6 +1305,7 @@ const Workspace = new Lang.Class({
             clone.overlay.relayout(false);
         }
 
+        this._currentLayout = null;
         this._recalculateWindowPositions(WindowPositionFlags.ANIMATE);
     },
 


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