mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
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 <rmorell@nvidia.com> Tested-by: Robert Morell <rmorell@nvidia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user