From e5130877e76112fb5676841e4fb3e65baff647a3 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 9 Feb 2011 19:42:01 -0500 Subject: [PATCH] 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. --- js/ui/workspace.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 0fa38d13b..0904913c0 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -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);