[PATCH inputproto multitouch] Revert addition of active_touches to device events

Peter Hutterer peter.hutterer at who-t.net
Fri Sep 16 09:17:08 PDT 2011


On Wed, Sep 14, 2011 at 10:17:56PM -0500, Chase Douglas wrote:
> I can't remember why it's there, and I don't see how it may be useful.
> If a client really wants to know how many touches are on the device,
> they can listen to raw events and count the number of active touches.
> 
> (Real reason: extending events is hard :)

Couldn't find anything in my emails or IRC log that discussed this. 
I _think_ that one of the arguments was that a client can decide quicker
whether a gesture can be ignored if it knows the number of touches. e.g. 
you don't ever handle pinch if there are already two fingers down,
regardless of whether you got those events or not. Any handling like that
would break bimanual interaction though so maybe it's better to remove it
anyway.

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>


Cheers,
  Peter


> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  XI2proto.h         |    1 -
>  specs/XI2proto.txt |    6 ------
>  2 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/XI2proto.h b/XI2proto.h
> index 9e2c63c..2460cf5 100644
> --- a/XI2proto.h
> +++ b/XI2proto.h
> @@ -936,7 +936,6 @@ typedef struct
>      uint32_t    flags;                  /**< ::XIKeyRepeat */
>      xXIModifierInfo     mods;
>      xXIGroupInfo        group;
> -    uint32_t    active_touches;         /**< Number of touches on source device (XI 2.1 only) */
>  } xXIDeviceEvent;
>  
>  
> diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
> index 73aa52b..b0607a1 100644
> --- a/specs/XI2proto.txt
> +++ b/specs/XI2proto.txt
> @@ -2031,11 +2031,8 @@ For a detailed description of classes, see the XIQueryDevice request.
>              buttons:                    SETofBUTTONMASK
>              valuators:                  SETofVALUATORMASK
>              axisvalues:                 LISTofFP3232
> -            active_touches*:            CARD32
>      └───
>  
> -    * since XI 2.2
> -
>      BUTTONBIT { (1 << Button1), (1 << Button2), ... , (1 << ButtonN) }
>      VALUATORBIT { (1 << 1), ( 1 << 2), ... ( 1 << n) }
>  
> @@ -2114,9 +2111,6 @@ KeyRelease, ButtonPress, ButtonRelease, Motion.
>          accepted or passed on ownership.  The touch will not generate any
>          further TouchUpdate events once an event with TouchPendingEnd has been
>          received.
> -    active_touches
> -        Only in XI 2.2 and later. Only valid for TouchBegin, TouchUpdate, and
> -        TouchEnd events.
>  
>  The active_touches value denotes the number of touches in contact with
>  the source touch device surface when the event occurred. The value
> -- 
> 1.7.4.1
> 


More information about the xorg-devel mailing list