[gnome-shell/wip/overviewTransitions: 5/5] f
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/overviewTransitions: 5/5] f
- Date: Sun, 3 Aug 2014 16:00:21 +0000 (UTC)
commit 46b919a77b69a2f234ad3fd480ecc64048dc3f25
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Sat Aug 2 21:40:14 2014 +0200
f
js/ui/viewSelector.js | 1 -
js/ui/workspace.js | 34 +++++++++++++++++++---------------
2 files changed, 19 insertions(+), 16 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 2da78b2..e040063 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -327,7 +327,6 @@ const ViewSelector = new Lang.Class({
if (showingAppsFromOverview) {
// Let workspace.js manage the animation of the windows clones.
this._workspacesPage.show();
- this._workspacesPage.opacity = 255;
this._showPage(this._workspacesPage);
}
this._workspacesDisplay.animateFromOverview(showingAppsFromOverview);
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 44c306f..f9d7ce4 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -1590,11 +1590,25 @@ const Workspace = new Lang.Class({
// Animate the rest of the windows from WINDOW_ANIMATION_MAX_NUMBER_BLENDING to this._windows.length
// at the same time.
- for (let i = WINDOW_ANIMATION_MAX_NUMBER_BLENDING; i < this._windows.length; i++)
- this._fadeWindowToOverview(i, windowBaseTime * (WINDOW_ANIMATION_MAX_NUMBER_BLENDING + 1), i ==
this._windows.length - 1);
+ let onCompleteWindowsAnimation = function() {
+ this.animatingWindowsFade = false;
+ // Position and scale the windows in case the user use workspacePage
+ // after using appsPage
+ this._recalculateWindowPositions(WindowPositionFlags.INITIAL);
+ // Given that viewSelector uses the same time to hide the windows
+ // we can restore the opacity of windows clones here withouth flickering
+ for (let i = 0; i < this._windows.length; i++) {
+ let clone = this._windows[i];
+ clone.actor.opacity = 255;
+ }
+ });
+ for (let i = WINDOW_ANIMATION_MAX_NUMBER_BLENDING; i < this._windows.length; i++) {
+ let onComplete = i == this._windows.length ? onCompleteWindowsAnimation : none;
+ this._fadeWindowToOverview(i, windowBaseTime * (WINDOW_ANIMATION_MAX_NUMBER_BLENDING + 1),
onComplete);
+ }
},
- _fadeWindowToOverview: function(index, time, lastWindow) {
+ _fadeWindowToOverview: function(index, time, onComplete) {
let clone = this._windows[index];
let overlay = this._windowOverlays[index];
@@ -1608,18 +1622,8 @@ const Workspace = new Lang.Class({
transition: 'easeOutQuad',
onComplete: Lang.bind(this,
function() {
- if (lastWindow) {
- this.animatingWindowsFade = false;
- // Position and scale the windows in case the user use workspacePage
- // after using appsPage
- this._recalculateWindowPositions(WindowPositionFlags.INITIAL);
- // Given that viewSelector uses the same time to hide the windows
- // we can restore the opacity of windows clones here withouth
flickering
- for (let i = 0; i < this._windows.length; i++) {
- let clone = this._windows[i];
- clone.actor.opacity = 255;
- }
- }
+ if (onComplete)
+ onComplete();
})
});
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]