[gnome-shell] viewSelector: make the old page fade-out optional



commit 5f3b04ecbd5b47a408243e85671ce48e3865bfb8
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Feb 16 12:59:54 2013 -0500

    viewSelector: make the old page fade-out optional
    
    When leaving the overview, we don't want the old page to fade out, but
    we want to fade in the windows directly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693974

 js/ui/viewSelector.js |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index de9237b..9a06c5c 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -169,7 +169,7 @@ const ViewSelector = new Lang.Class({
         if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
             Main.overview.fadeOutDesktop();
 
-        this._showPage(this._workspacesPage);
+        this._showPage(this._workspacesPage, true);
     },
 
     zoomFromOverview: function() {
@@ -205,7 +205,10 @@ const ViewSelector = new Lang.Class({
         return page;
     },
 
-    _fadePageIn: function() {
+    _fadePageIn: function(oldPage) {
+        if (oldPage)
+            oldPage.hide();
+
         this.emit('page-empty');
 
         this._activePage.show();
@@ -216,7 +219,7 @@ const ViewSelector = new Lang.Class({
             });
     },
 
-    _showPage: function(page) {
+    _showPage: function(page, noFade) {
         if (page == this._activePage)
             return;
 
@@ -224,19 +227,18 @@ const ViewSelector = new Lang.Class({
         this._activePage = page;
         this.emit('page-changed');
 
-        if (oldPage)
+        if (oldPage && !noFade)
             Tweener.addTween(oldPage,
                              { opacity: 0,
                                time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 2,
                                transition: 'easeOutQuad',
                                onComplete: Lang.bind(this,
                                    function() {
-                                       oldPage.hide();
-                                       this._fadePageIn();
+                                       this._fadePageIn(oldPage);
                                    })
                              });
         else
-            this._fadePageIn();
+            this._fadePageIn(oldPage);
     },
 
     _a11yFocusPage: function(page) {


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