[PATCH] Update currentTime in dispatch loop

Chase Douglas chase.douglas at canonical.com
Wed Apr 18 12:17:16 PDT 2012


A request, like input device grabs, may check a request timestamp
against currentTime. It is possible for currentTime to lag a previously
sent event timestamp. If the client makes a request based on such an
event timestamp, the request may fail the validity check against
currentTime unless we always update the time before processing the
request.

Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
 dix/dispatch.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dix/dispatch.c b/dix/dispatch.c
index bce3a0d..ea7fdd4 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -349,6 +349,7 @@ Dispatch(void)
 
     SmartScheduleSlice = SmartScheduleInterval;
     while (!dispatchException) {
+        UpdateCurrentTimeIf();
         if (*icheck[0] != *icheck[1]) {
             ProcessInputEvents();
             FlushIfCriticalOutputPending();
-- 
1.7.9.1



More information about the xorg-devel mailing list