spring: End spring simulatio faster
The spring animation runs for a long time after it has visually settled down, because we're requiring too much stability.
This commit is contained in:
+2
-2
@@ -94,8 +94,8 @@ weston_spring_update(struct weston_spring *spring, uint32_t msec)
|
|||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
weston_spring_done(struct weston_spring *spring)
|
weston_spring_done(struct weston_spring *spring)
|
||||||
{
|
{
|
||||||
return fabs(spring->previous - spring->target) < 0.0002 &&
|
return fabs(spring->previous - spring->target) < 0.002 &&
|
||||||
fabs(spring->current - spring->target) < 0.0002;
|
fabs(spring->current - spring->target) < 0.002;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef void (*weston_surface_animation_frame_func_t)(struct weston_surface_animation *animation);
|
typedef void (*weston_surface_animation_frame_func_t)(struct weston_surface_animation *animation);
|
||||||
|
|||||||
Reference in New Issue
Block a user