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.

Signed-off-by: Adam Jackson <[email protected]>
---
 render/animcur.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/render/animcur.c b/render/animcur.c
index 0707fe7271..05dfc640aa 100644
--- a/render/animcur.c
+++ b/render/animcur.c
@@ -170,10 +170,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.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to