animation: ensure repaints are always scheduled during animations
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Thu, 22 May 2014 20:41:33 +0000 (22:41 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 19 Jun 2014 00:14:40 +0000 (17:14 -0700)
commitf8bfd0581b37449a5e91d8b190f8a5bbde6bca1e
tree38b7b43d3fb14039788036e05a197ff401c5a215
parent5905ebcc33605e4520abcfd9664caf9c95d72098
animation: ensure repaints are always scheduled during animations

Animations are run off the repaint cycle so if there's nothing to
repaint, an animation will stop running. This is usually not a problem
as each frame function of an animation causes something to change and
therefore a repaint to happen. This patch helps detect when the
animation isn't in said case and triggers a repaint to keep the
animation running.

This problem was found by using weston_move_scale_run() to move a view
onscreen from completely off. The very first time the animation frame
function was called the progress wasn't enough to move it into
view. The compositor saw there was nothing to repaint and stopped
doing anything else. When something else (like a pointer move) forced
a redraw, the view's position was very much onscreen and jumped into
view in an ugly way.
src/animation.c
src/spring-tool.c