summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-01-11 07:38:12 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-01-13 09:04:49 +1000
commitf9e6858d5c10be6a8439c0f18bfb2325fa0ee070 (patch)
tree84b40beaee9a5495bdc7c59137992e689c7523b2
parenta6273cc85c01fc020643a68e49ca4e7a2d2ae898 (diff)
Use event time instead of CurrentTime for grab times
When {XI,X,}AllowEvents is called, the timestamp is compared against the grab time to ensure that the request pertains to the current grab in the server. While many clients may use CurrentTime (client-side), the timestamp of the event causing the grab is also valid. This change ensures that the server's notion of the grab time is the time of the event that activated the grab rather than the time that the grab is actually activated. This bug was exposed through nested touch then pointer grabs. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--dix/events.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dix/events.c b/dix/events.c
index 0c4255cec..04d7fb59b 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3723,7 +3723,8 @@ ActivatePassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event,
}
}
- (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
+ (*grabinfo->ActivateGrab)(device, grab,
+ ClientTimeToServerTime(event->any.time), TRUE);
if (xE)
{