[PATCH 2/3][master][1.12] Check core event mask properly for pointer emulated touch events
Chase Douglas
chase.douglas at canonical.com
Wed Apr 4 13:48:10 PDT 2012
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 at canonical.com>
---
Xi/exevents.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index ff22240..05cd677 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1305,6 +1305,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));
@@ -1317,20 +1319,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;
}
--
1.7.9.1
More information about the xorg-devel
mailing list