summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2014-07-30 00:56:18 +0100
committerJason Ekstrand <jason.ekstrand@intel.com>2014-07-30 10:54:23 -0700
commit70ee3ad47c12dc3b4173373f98e1dc1c7486c5d7 (patch)
tree28f492392bacff09c00ae102fdc1249d0eda68b7
parent661de3a6a7ad11a9e4b39b346fea4dad3f853582 (diff)
animation: also change stop value when updating a fade target
If we're fading a view with weston_fade_run() and half way through we want to unfade it we can use weston_fade_update() to set a new alpha target. When the animation finishes, reset_alpha() is called which ensures the alpha value of the view is exactly as requested. Although weston_fade_update() was updating the spring target so the animation would look fine, it would then reset to the alpha target given in the first call to weston_fade_run().
-rw-r--r--src/animation.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/animation.c b/src/animation.c
index 5ded3adc..0febe413 100644
--- a/src/animation.c
+++ b/src/animation.c
@@ -330,6 +330,7 @@ WL_EXPORT void
weston_fade_update(struct weston_view_animation *fade, float target)
{
fade->spring.target = target;
+ fade->stop = target;
}
static void