From 7a2836f8db9941aaefd88b595f43589ff513b53e Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 2 Jul 2019 21:03:10 +0200 Subject: Update currentTime in dispatch loop commit 312910b4e34215aaa50fc0c6092684d5878dc32f Author: Chase Douglas Date: Wed Apr 18 11:15:40 2012 -0700 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 Reviewed-by: Peter Hutterer --- nx-X11/programs/Xserver/dix/dispatch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index d656da748..f80cec0dd 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -407,6 +407,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) { -- cgit v1.2.3