[PATCH weston 2/3] animation: Fix input panel slide animation

Ander Conselvan de Oliveira conselvan2 at gmail.com
Mon Apr 14 05:48:06 PDT 2014


From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>

The position for the slide animation was calculated assuming the value
of the spring was always between 0.0 and 1.0. Commit 3a869019 broke
that assumption, and the result was that the panel would be positioned
at an invisible part of screen. Since there would be no output repaints
scheduled, the result of the animation would only be seen if something
else triggered a repaint (such as a mouse cursor movement).

This patch changes the values for the slide animation's spring to range
between 0.0 and 1.0, thus fixing the position of the panel and the lack
of scheduled repaints problem.

https://bugs.freedesktop.org/show_bug.cgi?id=77347
---
 src/animation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/animation.c b/src/animation.c
index 0c53cdb..a29b34a 100644
--- a/src/animation.c
+++ b/src/animation.c
@@ -389,7 +389,7 @@ weston_slide_run(struct weston_view *view, float start, float stop,
 	if (!animation)
 		return NULL;
 
-	weston_spring_init(&animation->spring, 400.0, start, stop);
+	weston_spring_init(&animation->spring, 400.0, 0.0, 1.0);
 	animation->spring.friction = 600;
 	animation->spring.clip = WESTON_SPRING_BOUNCE;
 
-- 
1.8.3.2



More information about the wayland-devel mailing list