[gnome-shell/wip/swarm: 3/13] viewSelector: Only animate with swarm on special cases



commit 498fd3263305f387dbb14483967f56940687501c
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Tue Jun 17 20:58:50 2014 +0200

    viewSelector: Only animate with swarm on special cases

 js/ui/viewSelector.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 472cef3..e004e45 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -228,18 +228,18 @@ const ViewSelector = new Lang.Class({
                          });
     },
 
-    _animateIn: function(page) {
+    _animateIn: function(page, oldPage) {
         page.show();
 
-        if (page == this._appsPage) {
+        if (page == this._appsPage && oldPage == this._workspacesPage) {
             this.appDisplay.animate(IconGrid.ANIMATION_DIRECTION_IN);
         } else {
             this._fadePageIn(page);
         }
     },
 
-    _animateOut: function(page, onComplete) {
-        if (page == this._appsPage) {
+    _animateOut: function(page, newPage, onComplete) {
+        if (page == this._appsPage && newPage == this._workspacesPage) {
             this.appDisplay.animate(IconGrid.ANIMATION_DIRECTION_OUT,
                                     onComplete);
         } else {
@@ -264,11 +264,11 @@ const ViewSelector = new Lang.Class({
         let animateActivePage = Lang.bind(this,
             function() {
                 this._hidePageAndSyncEmpty(oldPage);
-                this._animateIn(this._activePage);
+                this._animateIn(page, oldPage);
             });
 
         if (oldPage && animateOut)
-            this._animateOut(oldPage, animateActivePage)
+            this._animateOut(oldPage, page, animateActivePage)
         else
             animateActivePage();
     },


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