[gnome-shell/wip/swarm: 5/13] viewSelector: Only animate with swarm on special cases
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/swarm: 5/13] viewSelector: Only animate with swarm on special cases
- Date: Tue, 12 Aug 2014 15:25:17 +0000 (UTC)
commit 67e444b0c129dcbfb72f96a4ad9d1dc1b133c197
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 | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 57e135d..8d38900 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -389,10 +389,10 @@ 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) {
// Restore opacity of the page, since we could took the
// opacity on _fadePageIn if we didn't use appDisplay custom
// animation to animate out.
@@ -403,8 +403,10 @@ const ViewSelector = new Lang.Class({
}
},
- _animateOut: function(page, onComplete) {
- if (page == this._appsPage) {
+ _animateOut: function(page, newPage, onComplete) {
+ if (page == this._appsPage &&
+ newPage == this._workspacesPage &&
+ !Main.overview.animationInProgress) {
this.appDisplay.animate(IconGrid.AnimationDirection.OUT,
onComplete);
} else {
@@ -432,11 +434,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)
- 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]