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>
This commit is contained in:
parent
4c1dfd2193
commit
93c3340364
|
@ -1327,6 +1327,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
InputClients *iclients = NULL;
|
InputClients *iclients = NULL;
|
||||||
|
*mask = NULL;
|
||||||
|
|
||||||
if (listener->type == LISTENER_GRAB ||
|
if (listener->type == LISTENER_GRAB ||
|
||||||
listener->type == LISTENER_POINTER_GRAB) {
|
listener->type == LISTENER_POINTER_GRAB) {
|
||||||
|
@ -1378,6 +1379,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
if (!iclients)
|
if (!iclients)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
*mask = iclients->xi2mask;
|
||||||
*client = rClient(iclients);
|
*client = rClient(iclients);
|
||||||
}
|
}
|
||||||
else if (listener->level == XI) {
|
else if (listener->level == XI) {
|
||||||
|
@ -1409,7 +1411,6 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
*client = oclients ? rClient(oclients) : wClient(*win);
|
*client = oclients ? rClient(oclients) : wClient(*win);
|
||||||
}
|
}
|
||||||
|
|
||||||
*mask = iclients ? iclients->xi2mask : NULL;
|
|
||||||
*grab = NULL;
|
*grab = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue