Xi: allow for XIAllowEvent requests larger than XI < 2.2 size (#68554)

XIAllowEvents changed length in XI 2.2 (for the touchid). A bug in libXi
causes libXi to always use the new request length if the server supports
2.2, regardless of the client's XIQueryVersion request.

The server takes the client's XIQueryVersion request into account though,
resulting in a BadLength error if a 2.[0,1] client calls XIAllowEvents on a
XI 2.2+ server.

Can't fix this in libXi, so work around this in the server.

X.Org Bug 68554 <http://bugs.freedesktop.org/show_bug.cgi?id=68554>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 94d4e29aed)
This commit is contained in:
Peter Hutterer 2013-08-26 15:51:46 +10:00
parent 2ac257d845
commit cc7084af0d

View file

@ -81,7 +81,7 @@ ProcXIAllowEvents(ClientPtr client)
have_xi22 = TRUE;
}
else {
REQUEST_SIZE_MATCH(xXIAllowEventsReq);
REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
}
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);