Ensure that if we're called exactly on the threshold of a NegativeTransition trigger that we reshedule to pick up an idle time over the threshold.
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rog...@canonical.com> Reviewed-by: Adam Jackson <a...@redhat.com> --- Xext/sync.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Xext/sync.c b/Xext/sync.c index fc7c462..93aee37 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -2292,6 +2292,14 @@ IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask) break; } } + /* + * We've been called exactly on the idle time, but we have a + * NegativeTransition trigger which requires a transition from an + * idle time greater than this. Schedule a wakeup for the next + * millisecond so we won't miss a transition. + */ + if (XSyncValueEqual (idle, *pIdleTimeValueLess)) + AdjustWaitForDelay(wt, 1); } else if (pIdleTimeValueGreater) { -- 1.7.2.3 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel