summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-04-04 12:57:40 -0700
committerChase Douglas <chase.douglas@ubuntu.com>2012-04-18 13:58:39 -0700
commit4c1dfd21937efc6a85fb204a73dd7d7151d54daa (patch)
tree53d4995b36a1d166cd9d8f171f3fb1ecdf068209
parent80fefc42f5e67e6b4a4b440d8991bee7e5f38359 (diff)
Check core event mask properly for pointer emulated touch events
The current code checks the core event mask as though it were an XI2 mask. This change fixes the checks so the proper client and event masks are used. 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>
-rw-r--r--Xi/exevents.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index c05c22604..7da80aaeb 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1377,6 +1377,8 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
BUG_WARN(!iclients);
if (!iclients)
return FALSE;
+
+ *client = rClient(iclients);
}
else if (listener->level == XI) {
int xi_type = GetXIType(TouchGetPointerEventType(ev));
@@ -1389,20 +1391,24 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
BUG_WARN(!iclients);
if (!iclients)
return FALSE;
+
+ *client = rClient(iclients);
}
else {
int coretype = GetCoreType(TouchGetPointerEventType(ev));
Mask core_filter = event_get_filter_from_type(dev, coretype);
+ OtherClients *oclients;
/* all others */
- nt_list_for_each_entry(iclients,
- (InputClients *) wOtherClients(*win), next)
- if (iclients->mask[XIAllDevices] & core_filter)
- break;
- /* if owner selected, iclients is NULL */
+ nt_list_for_each_entry(oclients,
+ (OtherClients *) wOtherClients(*win), next)
+ if (oclients->mask & core_filter)
+ break;
+
+ /* if owner selected, oclients is NULL */
+ *client = oclients ? rClient(oclients) : wClient(*win);
}
- *client = iclients ? rClient(iclients) : wClient(*win);
*mask = iclients ? iclients->xi2mask : NULL;
*grab = NULL;
}