[gnome-shell] environment: Remove transition tracking
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] environment: Remove transition tracking
- Date: Wed, 7 Aug 2019 16:06:32 +0000 (UTC)
commit 9073debe60c8da76c2a47b068a7cdb64f7567cc2
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Aug 7 02:28:40 2019 +0200
environment: Remove transition tracking
The tracking was important in an earlier iteration, but as the helper
functions now remove overwritten transitions before setting up the
new ones, we can just as well connect to the ::stopped signal directly.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/668
js/ui/environment.js | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/js/ui/environment.js b/js/ui/environment.js
index a248ea069..f2944a5c1 100644
--- a/js/ui/environment.js
+++ b/js/ui/environment.js
@@ -58,20 +58,6 @@ function _patchLayoutClass(layoutClass, styleProps) {
};
}
-let _easingTransitions = new Map();
-
-function _trackTransition(transition, callback) {
- if (_easingTransitions.has(transition))
- transition.disconnect(_easingTransitions.get(transition));
-
- let id = transition.connect('stopped', (t, isFinished) => {
- _easingTransitions.delete(transition);
- callback(isFinished);
- });
-
- _easingTransitions.set(transition, id);
-}
-
function _makeEaseCallback(params) {
let onComplete = params.onComplete;
delete params.onComplete;
@@ -136,7 +122,7 @@ function _easeActor(actor, params) {
let transition = actor.get_transition(animatedProps[0]);
if (transition)
- _trackTransition(transition, callback);
+ transition.connect('stopped', (t, finished) => callback(finished));
else
callback(true);
}
@@ -180,7 +166,7 @@ function _easeActorProperty(actor, propName, target, params) {
transition.set_to(target);
if (callback)
- _trackTransition(transition, callback);
+ transition.connect('stopped', (t, finished) => callback(finished));
}
function _loggingFunc(...args) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]