[PATCH libXi 2/3] Require XI 2 for all XI 2 calls.

Peter Hutterer peter.hutterer at who-t.net
Wed Mar 2 15:53:06 PST 2011


On Wed, Mar 02, 2011 at 01:02:40PM +0100, Julien Cristau wrote:
> On Thu, Sep  9, 2010 at 14:43:02 +1000, Peter Hutterer wrote:
> 
> > Each XI2 call should check _XiCheckExtInit for XI version 2.0 or higher.
> > 
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> 
> Isn't it the client's responsibility to check this with XIQueryVersion?

yes

> Or handle the BadRequest from other XI2 requests if they don't?

yes-ish :) if you look at the other calls in libXi, they all check for some
extension version as introduced (except XGetExtensionVersion obviously).
This simply complements the already existing behaviour for XI 1.x calls.

I think some sanity checking is good though - if the client does not check
for XI2 presence and sends of XI1 requests, these may conflict with some
other extension and cause weird effects in the server. If the extension is
present but doesn't support a particular request the server should send
BadRequest. But - the client is already responsible for making sure the
server supports the requests it sends to, so...
 
Cheers,
  Peter


More information about the xorg-devel mailing list