From 5f3b04ecbd5b47a408243e85671ce48e3865bfb8 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Sat, 16 Feb 2013 12:59:54 -0500 Subject: [PATCH] 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 file changed, 9 insertions(+), 7 deletions(-) diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index de9237bea..9a06c5c76 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) {