summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-04-04 12:59:55 -0700
committerChase Douglas <chase.douglas@ubuntu.com>2012-04-18 13:58:39 -0700
commit93c33403642a3de3c9d141ad7940a7b880846aad (patch)
treee72bdbac7d39a81166a5e7b71ac9edff55880231 /Xi
parent4c1dfd21937efc6a85fb204a73dd7d7151d54daa (diff)
Only set XI2 mask if pointer emulation is for XI2 client
The current code returns a reference to memory that may not actually be an XI2 mask. Instead, only return a value when an XI2 client has selected for events. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 7da80aaeb..ab2f044d9 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1327,6 +1327,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
{
int rc;
InputClients *iclients = NULL;
+ *mask = NULL;
if (listener->type == LISTENER_GRAB ||
listener->type == LISTENER_POINTER_GRAB) {
@@ -1378,6 +1379,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (!iclients)
return FALSE;
+ *mask = iclients->xi2mask;
*client = rClient(iclients);
}
else if (listener->level == XI) {
@@ -1409,7 +1411,6 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
*client = oclients ? rClient(oclients) : wClient(*win);
}
- *mask = iclients ? iclients->xi2mask : NULL;
*grab = NULL;
}