[gnome-shell] workspace: Refactor code a bit



commit 6851c5443adb856792039ab987eff7c8dcdc76eb
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Aug 23 23:33:35 2012 -0300

    workspace: Refactor code a bit
    
    https://bugzilla.gnome.org/show_bug.cgi?id=582650

 js/ui/workspace.js |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index cff9a42..8edab8b 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -986,15 +986,10 @@ const Workspace = new Lang.Class({
         if (this._reservedSlot == clone)
             return;
 
-        if (clone && this.containsMetaWindow(clone.metaWindow)) {
-            this._reservedSlot = null;
-            this.positionWindows(WindowPositionFlags.ANIMATE);
-            return;
-        }
-        if (clone)
-            this._reservedSlot = clone;
-        else
-            this._reservedSlot = null;
+        if (clone && this.containsMetaWindow(clone.metaWindow))
+            clone = null;
+
+        this._reservedSlot = clone;
         this.positionWindows(WindowPositionFlags.ANIMATE);
     },
 



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