From 0f9e89b4e309e570d7d366489d250ca2143f0ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Tue, 14 Aug 2007 22:47:49 +0200 Subject: [PATCH] Fix the value comparisons in the IDLETIME wakeup handler. LessThan/GreaterThan comparisons were used in the wakeup handler, and LessOrEqual/GreaterOrEqual in the block handler. Change it to use LessOrEqual/GreaterOrEqual in both functions, since this is what XSyncNegativeComparison and XSyncPositiveComparison imply. --- Xext/sync.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Xext/sync.c b/Xext/sync.c index 6fc2dcc7c..d9b6a9f06 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -2592,8 +2592,9 @@ IdleTimeWakeupHandler (pointer env, IdleTimeQueryValue (NULL, &idle); if ((pIdleTimeValueGreater && - XSyncValueGreaterThan (idle, *pIdleTimeValueGreater)) || - (pIdleTimeValueLess && XSyncValueLessThan (idle, *pIdleTimeValueLess))) + XSyncValueGreaterOrEqual (idle, *pIdleTimeValueGreater)) || + (pIdleTimeValueLess && + XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))) { SyncChangeCounter (IdleTimeCounter, idle); }