diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-06-17 11:08:11 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-06-17 11:08:11 -0400 |
commit | 1cfd406f9d40d6b39e4063e060b6c5114930f28c (patch) | |
tree | 9832afb6b93e6dde1abecbcf7bc7c3ec1afac075 /src/animation.c | |
parent | 8eb0f4f830884b018f104cbc238cfb0066ee514a (diff) | |
download | weston-1cfd406f9d40d6b39e4063e060b6c5114930f28c.tar.gz |
shell: Tweak spring animation for zoom animation type
Diffstat (limited to 'src/animation.c')
-rw-r--r-- | src/animation.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/animation.c b/src/animation.c index a93d26e2..0b2fa95a 100644 --- a/src/animation.c +++ b/src/animation.c @@ -239,8 +239,16 @@ WL_EXPORT struct weston_surface_animation * weston_zoom_run(struct weston_surface *surface, float start, float stop, weston_surface_animation_done_func_t done, void *data) { - return weston_surface_animation_run(surface, start, stop, + struct weston_surface_animation *zoom; + + zoom = weston_surface_animation_run(surface, start, stop, zoom_frame, done, data); + + weston_spring_init(&zoom->spring, 300.0, start, stop); + zoom->spring.friction = 1400; + zoom->spring.previous = start - (stop - start) * 0.03; + + return zoom; } static void |