[PATCH xserver 2/4] animcur: Return the next interval directly from the timer callback
Adam Jackson
ajax at redhat.com
Mon Nov 6 20:19:52 UTC 2017
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 <ajax at redhat.com>
---
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
More information about the xorg-devel
mailing list