From 8c72c85c76a003beaad9fe841ec4338dacd4b265 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 26 Oct 2017 13:53:06 -0400 Subject: [PATCH xserver 3/6] animcur: Return the next interval directly from the timer callback If the return value is non-zero here, DoTimer() will automatically rearm the timer for the new (relative) delay. 'soonest' is in absolute time, so subtract off 'now' and return that. Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson (cherry picked from commit cc3241a712684f8c7147f5688e9ee3ecb5a93b87) --- render/animcur.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/render/animcur.c b/render/animcur.c index 3f85f9a4f..26a6026ae 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -169,10 +169,9 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg) } if (activeDevice) - TimerSet(as->timer, TimerAbsolute, soonest, AnimCurTimerNotify, pScreen); - else - as->timer_set = FALSE; + return soonest - now; + as->timer_set = FALSE; return 0; } -- 2.14.3