[PATCH 3/3][master][1.12] Only set XI2 mask if pointer emulation is for XI2 client
Chase Douglas
chase.douglas at canonical.com
Wed Apr 4 13:48:11 PDT 2012
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 at canonical.com>
---
Xi/exevents.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 05cd677..2ecdeff 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1255,6 +1255,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
{
int rc;
InputClients *iclients = NULL;
+ *mask = NULL;
if (listener->type == LISTENER_GRAB ||
listener->type == LISTENER_POINTER_GRAB) {
@@ -1306,6 +1307,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (!iclients)
return FALSE;
+ *mask = iclients->xi2mask;
*client = rClient(iclients);
}
else if (listener->level == XI) {
@@ -1337,7 +1339,6 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
*client = oclients ? rClient(oclients) : wClient(*win);
}
- *mask = iclients ? iclients->xi2mask : NULL;
*grab = NULL;
}
--
1.7.9.1
More information about the xorg-devel
mailing list