summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-04-18 11:15:40 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2012-04-26 13:35:21 +1000
commit73cd880fe05c941391a8604406e9ecf657a77f02 (patch)
tree2d1020301774f89ca33367cc3f8e9543aaceaef6
parent96d8df5bc9d400d55830b23afe5525b222f8dfc7 (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> (cherry picked from commit 312910b4e34215aaa50fc0c6092684d5878dc32f)
-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)