wl_resource_destroy(&cb->resource);
}
- wl_list_for_each_safe(animation, next, &output->animation_list, link)
+ wl_list_for_each_safe(animation, next, &output->animation_list, link) {
animation->frame(animation, output, msecs);
+ animation->frame_counter++;
+ }
}
static int
}
weston_surface_damage(compositor->fade.surface);
- if (wl_list_empty(&compositor->fade.animation.link))
+ if (wl_list_empty(&compositor->fade.animation.link)) {
+ compositor->fade.animation.frame_counter = 0;
wl_list_insert(output->animation_list.prev,
&compositor->fade.animation.link);
+ }
}
static void
struct weston_animation {
void (*frame)(struct weston_animation *animation,
struct weston_output *output, uint32_t msecs);
+ int frame_counter;
struct wl_list link;
};
&zoom->transform.link);
weston_spring_init(&zoom->spring, 200.0, 0.0, 1.0);
zoom->spring.friction = 700;
+ zoom->animation.frame_counter = 0;
zoom->spring.timestamp = weston_compositor_get_time();
zoom->animation.frame = weston_zoom_frame;
weston_zoom_frame(&zoom->animation, NULL, zoom->spring.timestamp);
fade->data = data;
weston_spring_init(&fade->spring, 200.0, 0, 1.0);
fade->spring.friction = 700;
+ fade->animation.frame_counter = 0;
fade->spring.timestamp = weston_compositor_get_time();
fade->animation.frame = weston_fade_frame;
weston_fade_frame(&fade->animation, NULL, fade->spring.timestamp);