[PATCH weston] animation: also change stop value when updating a fade target
Jason Ekstrand
jason at jlekstrand.net
Wed Jul 30 11:09:59 PDT 2014
I just pushed this because it fixes a bug. I really don't like the fact
that we have to track this separately from spring.target. We should
probably fix the animation code so we don't.
--Jason Ekstrand
On Tue, Jul 29, 2014 at 4:56 PM, Jonny Lamb <jonny.lamb at collabora.co.uk>
wrote:
> 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().
> ---
> src/animation.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/animation.c b/src/animation.c
> index 5ded3ad..0febe41 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
> --
> 2.0.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140730/bdcd7b0f/attachment.html>
More information about the wayland-devel
mailing list