Xi: fix lookup in ActivateEarlyAccept
ActivateEarlyAccept() can only be called from a grabbing client, so we can
ignore the rest. And it's easy enough to get the client from that since
9ad0fdb135
.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d08bae297f
commit
8b0d210449
|
@ -1039,17 +1039,16 @@ ActivateEarlyAccept(DeviceIntPtr dev, TouchPointInfoPtr ti)
|
||||||
int rc;
|
int rc;
|
||||||
ClientPtr client;
|
ClientPtr client;
|
||||||
XID error;
|
XID error;
|
||||||
|
GrabPtr grab = ti->listeners[0].grab;
|
||||||
|
|
||||||
rc = dixLookupClient(&client, ti->listeners[0].listener, serverClient,
|
BUG_RETURN(ti->listeners[0].type != LISTENER_GRAB &&
|
||||||
DixSendAccess);
|
ti->listeners[0].type != LISTENER_POINTER_GRAB);
|
||||||
if (rc != Success) {
|
BUG_RETURN(!grab);
|
||||||
ErrorF("[Xi] Failed to lookup early accepting client.\n");
|
|
||||||
return;
|
client = rClient(grab);
|
||||||
}
|
|
||||||
|
|
||||||
if (TouchAcceptReject(client, dev, XIAcceptTouch, ti->client_id,
|
if (TouchAcceptReject(client, dev, XIAcceptTouch, ti->client_id,
|
||||||
ti->listeners[0].window->drawable.id, &error) !=
|
ti->listeners[0].window->drawable.id, &error) != Success)
|
||||||
Success)
|
|
||||||
ErrorF("[Xi] Failed to accept touch grab after early acceptance.\n");
|
ErrorF("[Xi] Failed to accept touch grab after early acceptance.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue