mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-26 23:00:44 +02:00
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 312910b4e3)
This commit is contained in:
parent
96d8df5bc9
commit
73cd880fe0
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue