[PATCH 2/2] Allow grabbing clients to accept or reject touches any time

Chase Douglas chase.douglas at canonical.com
Wed Sep 14 10:09:02 PDT 2011

On 09/14/2011 11:59 AM, Peter Hutterer wrote:
> On Wed, Sep 14, 2011 at 10:22:36AM -0500, Chase Douglas wrote:
>> This is potentially both a performance and client complexity
>> improvement.
> this needs more description, especially for the archives (we just talked
> about this here at the XDC), please add that to the commit message.
> and one more thing: if a client can reject a sequence at any time it may be
> that the sequence already disappeared by the time the reject is processed.
> (this shouldn't happen unless the client buffers the request but thats been
> known to happen).
> should we allow clients to reject any touch (even invalid ones) without
> returning a BadValue?

Hmmm... The same could happen with accept too:

* Client A owns touch
* Client B has a touch grab and is listening too

1. Client A accepts touch
2. TouchEnd sent to client B
3. Client B accepts touch (which means, I accept iff I become the owner)
4. TouchEnd reaches client B
5. Client B gets an error from the touch acceptance because at the time
the server got the accept request, the touch has already ended for client B

We probably need to think a bit more about this...

-- Chase

More information about the xorg-devel mailing list