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
This commit is contained in:
Jasper St. Pierre 2013-04-22 18:14:02 -04:00
parent c1993a6ffc
commit e1de3973fe

View File

@ -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;