summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-04-18 11:15:40 -0700
committerChase Douglas <chase.douglas@ubuntu.com>2012-04-18 20:35:36 -0700
commit312910b4e34215aaa50fc0c6092684d5878dc32f (patch)
treeb69d46a94efa07c45f829a9b2744cb8f6ddd5dca /dix
parenta986f2f30cbe2a00e72ded7315c4951d7703e549 (diff)
Update currentTime in dispatch loop
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@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r--dix/dispatch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index bce3a0da3..9a2e22fe6 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -393,6 +393,9 @@ Dispatch(void)
}
/* now, finally, deal with client requests */
+ /* Update currentTime so request time checks, such as for input
+ * device grabs, are calculated correctly */
+ UpdateCurrentTimeIf();
result = ReadRequestFromClient(client);
if (result <= 0) {
if (result < 0)