Avoid relayout when not changing the workspace reserved slot

Make calling workspace.setReservedSlot(null) do nothing if the slot was
already null; this improves efficiency and more importantly chills out some
weird reentrancy at the end of drag and drop that removes a window from
a workspace.
This commit is contained in:
Owen W. Taylor 2011-02-09 19:42:01 -05:00
parent 75f771d736
commit e5130877e7

View File

@ -921,6 +921,9 @@ Workspace.prototype = {
},
setReservedSlot: function(clone) {
if (this._reservedSlot == clone)
return;
if (clone && this.containsMetaWindow(clone.metaWindow)) {
this._reservedSlot = null;
this.positionWindows(WindowPositionFlags.ANIMATE);