[gnome-shell] dash: Disable animations during overview transitions
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dash: Disable animations during overview transitions
- Date: Mon, 12 Nov 2012 16:00:01 +0000 (UTC)
commit f602993aa9172eec0297105b7897149e84456812
Author: Florian MÃllner <fmuellner gnome org>
Date: Tue Oct 30 20:15:29 2012 +0100
dash: Disable animations during overview transitions
When updating the dash, we already avoid all animations while the
overview is hidden. However, as we are using Main.queueDeferredWork(),
updates may be deferred up to ~20 seconds while the overview is hidden.
If the overview is entered before a queued update has taken place, it
will be run immediately on map - as the overview is visible by then,
this means animating any outstanding changes.
Work around this by skipping animations during overview transitions as
well.
https://bugzilla.gnome.org/show_bug.cgi?id=686530
js/ui/dash.js | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index d367aaa..3bd3766 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -637,8 +637,10 @@ const Dash = new Lang.Class({
icon.setIconSize(this.iconSize);
// Don't animate the icon size change when the overview
- // is not visible or when initially filling the dash
- if (!Main.overview.visible || !this._shownInitially)
+ // is transitioning, not visible or when initially filling
+ // the dash
+ if (!Main.overview.visible || Main.overview.animationInProgress ||
+ !this._shownInitially)
continue;
let [targetWidth, targetHeight] = icon.icon.get_size();
@@ -762,8 +764,9 @@ const Dash = new Lang.Class({
for (let i = 0; i < removedActors.length; i++) {
let item = removedActors[i]._delegate;
- // Don't animate item removal when the overview is hidden
- if (Main.overview.visible)
+ // Don't animate item removal when the overview is transitioning
+ // or hidden
+ if (Main.overview.visible && !Main.overview.animationInProgress)
item.animateOutAndDestroy();
else
item.destroy();
@@ -778,8 +781,9 @@ const Dash = new Lang.Class({
return;
}
- // Don't animate item addition when the overview is hidden
- if (!Main.overview.visible)
+ // Don't animate item addition when the overview is transitioning
+ // or hidden
+ if (!Main.overview.visible || Main.overview.animationInProgress)
return;
for (let i = 0; i < addedItems.length; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]