[gnome-shell] appDisplay: Disable scrolling during animations
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] appDisplay: Disable scrolling during animations
- Date: Wed, 4 Mar 2015 12:45:58 +0000 (UTC)
commit 6bb905895c932db51ff0314fecec765f2f703f31
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Mar 4 10:29:22 2015 +0100
appDisplay: Disable scrolling during animations
Currently scroll events during the swarm animation will make the
grid appear immediately in addition to the animating clones, and
there'll be a mismatch with the icon at the target position. This
badly breaks the illusion of launchers emerging from the dash and
positioning themselves in a grid - as scrolling icons "mid-air"
before they form a paginated grid doesn't make much sense anyway,
fix this issue by ignoring scroll events for the duration of the
animation.
https://bugzilla.gnome.org/show_bug.cgi?id=745574
js/ui/appDisplay.js | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 1df417f..e1ff13a 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -541,6 +541,12 @@ const AllView = new Lang.Class({
// Overriden from BaseAppView
animate: function (animationDirection, onComplete) {
+ this._scrollView.reactive = false;
+ let completionFunc = Lang.bind(this, function() {
+ this._scrollView.reactive = true;
+ onComplete();
+ });
+
if (animationDirection == IconGrid.AnimationDirection.OUT &&
this._displayingPopup && this._currentPopup) {
this._currentPopup.popdown();
@@ -551,10 +557,10 @@ const AllView = new Lang.Class({
// signal handler, call again animate which will
// call the parent given that popup is already
// closed.
- this.animate(animationDirection, onComplete);
+ this.animate(animationDirection, completionFunc);
}));
} else {
- this.parent(animationDirection, onComplete);
+ this.parent(animationDirection, completionFunc);
if (animationDirection == IconGrid.AnimationDirection.OUT)
this._pageIndicators.animateIndicators(animationDirection);
}
@@ -641,7 +647,7 @@ const AllView = new Lang.Class({
},
_onScroll: function(actor, event) {
- if (this._displayingPopup)
+ if (this._displayingPopup || !this._scrollView.reactive)
return Clutter.EVENT_STOP;
let direction = event.get_scroll_direction();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]