[PATCH xserver] present: Handle event mask updates as specified v2

Kenneth Graunke kenneth at whitecape.org
Fri Jul 29 19:29:40 UTC 2016


On Friday, July 29, 2016 6:41:06 PM PDT Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> From the Present extension specification:
> 
>  An event context is associated with a specific window; using
>  an existing event context with a different window generates
>  a Match error.
> 
>  If eventContext specifies an existing event context, then if
>  eventMask is empty, PresentSelectInput deletes the specified
>  context, otherwise the specified event context is changed to
>  select a different set of events.
> 
>  If eventContext is an unused XID, then if eventMask is empty
>  no operation is performed. Otherwise, a new event context is
>  created selecting the specified events.
> 
> Without this change, there's no way for a client to explicitly change
> or destroy an existing event mask entry. Trying to do so as specified
> above would just result in a protocol error.
> 
> v2: (Keith Packard)
> * Use dixLookupResourceByType instead of walking window_priv->events
> * Return BadMatch if the existing event context is associated with a
>   different window or client
> * Call LEGAL_NEW_RESOURCE again when creating a new event context
> * Drop invalid "leak fix"
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160729/89ff9063/attachment.sig>


More information about the xorg-devel mailing list