IDLETIME: Fix edge-case in IdleTimeBlockHandler
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.rogers@canonical.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
b55bf24858
commit
a2e67a6412
|
@ -2793,6 +2793,14 @@ IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask)
|
||||||
break;
|
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)
|
else if (pIdleTimeValueGreater)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue