[gnome-shell] workspace: Recalculate window positions when we have no layout



commit e1de3973fe5282287237c6897b7f1213629cc531
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 22 18:14:02 2013 -0400

    workspace: Recalculate window positions when we have no layout
    
    If for any reason the current layout is invalidated, queue a
    reposition.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698622

 js/ui/workspace.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index a8d16ab..8121c69 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -989,8 +989,7 @@ const Workspace = new Lang.Class({
         Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
             this._dropRect.set_position(geom.x, geom.y);
             this._dropRect.set_size(geom.width, geom.height);
-            if (this._currentLayout != null)
-                this._updateWindowPositions(WindowPositionFlags.NONE);
+            this._updateWindowPositions(WindowPositionFlags.NONE);
             return false;
         }));
     },
@@ -1059,6 +1058,11 @@ const Workspace = new Lang.Class({
     },
 
     _updateWindowPositions: function(flags) {
+        if (this._currentLayout == null) {
+            this._recalculateWindowPositions(flags);
+            return;
+        }
+
         let initialPositioning = flags & WindowPositionFlags.INITIAL;
         let animate = flags & WindowPositionFlags.ANIMATE;
 


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