[gnome-shell] Avoid relayout when not changing the workspace reserved slot



commit e5130877e76112fb5676841e4fb3e65baff647a3
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Feb 9 19:42:01 2011 -0500

    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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 0fa38d1..0904913 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);



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