[PATCH inputproto] Added version 2.1 constants.

Peter Hutterer peter.hutterer at who-t.net
Wed May 18 20:00:41 PDT 2011


On Wed, May 18, 2011 at 06:28:15PM +0200, Philipp Reh wrote:
> Also updated the specs for XIGrabDevice which now
> sends an additional confine_to parameter after the mask.
> ---
>  XI2.h              |    4 ++++
>  specs/XI2proto.txt |    7 +++++++
>  2 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/XI2.h b/XI2.h
> index 3c39946..90730be 100644
> --- a/XI2.h
> +++ b/XI2.h
> @@ -32,11 +32,15 @@
>  #define Dont_Check                              0
>  #endif
>  #define XInput_2_0                              7
> +#define XInput_2_1                              8
>  
>  
>  #define XI_2_Major                              2
>  #define XI_2_Minor                              0
>  
> +#define XI_2_1_Major                            2
> +#define XI_2_1_Minor                            1
> +
>  /* Property event flags */
>  #define XIPropertyDeleted                       0
>  #define XIPropertyCreated                       1
> diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
> index 1e3adbe..41f4786 100644
> --- a/specs/XI2proto.txt
> +++ b/specs/XI2proto.txt
> @@ -816,6 +816,7 @@ Return the current focus window for the given device.
>              cursor:          Cursor
>              mask_len:        CARD16
>              masks:           SETofEVENTMASK
> +            confine_to:      Window
>>              status:          Success, AlreadyGrabbed, Frozen, InvalidTime, NotViewable
>      └───
> @@ -845,6 +846,8 @@ device.
>          Length of mask in 4 byte units.
>      mask
>          Event mask. An event mask for an event type T is defined as (1 << T).
> +    confine_to
> +        The window to confine the pointer to. Can be None.
>      status
>          Success or the reason why the grab could not be established.
>  
> @@ -881,6 +884,10 @@ devices are frozen; they are simply queued for later processing.
>  If the cursor is not None and the device is a master pointer device, the
>  cursor will be displayed until the device is ungrabbed.
>  
> +Also, if confine_to is not None and the device is a master pointer device,
> +the cursor will be confined to that window. This behaviour is new
> +in version 2.1 of the procotol.
> +

thanks. I've merged this into my 2.1 inputproto branch with a few minor
modifications to the wording (to be more in-line with the RawEvents patches
and the MT pages).

Cheers,
  Peter

>  This request fails and returns:
>  
>      AlreadyGrabbed: If the device is actively grabbed by some other client.
> -- 
> 1.7.5.rc3
 


More information about the xorg-devel mailing list