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>
This commit is contained in:
parent
a986f2f30c
commit
312910b4e3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user