[PATCH 4/5] Implement early touch reject

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 2 21:40:27 PST 2012


On Thu, Feb 02, 2012 at 04:57:57PM -0800, Chase Douglas wrote:
> From: Chase Douglas <chase.douglas at ubuntu.com>
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  dix/touch.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/touch.c b/dix/touch.c
> index e24d9ac..1faeb7c 100644
> --- a/dix/touch.c
> +++ b/dix/touch.c
> @@ -1019,9 +1019,16 @@ AllowTouch(ClientPtr client, DeviceIntPtr dev, int mode, uint32_t touchid,
>      if (i < ti->num_listeners)
>          return BadAccess;
>  
> -    /* FIXME: Implement early accept/reject */
>      if (i > 0)
> +    {
> +        if (mode == XIRejectTouch)
> +        {
> +            TouchRemoveListener(ti, ti->listeners[i].listener);
> +            return Success;

We need to send a TouchEnd to the listener before we remove it.

Cheers,
  Peter

> +        }
> +        /* FIXME: Implement early accept */
>          return BadAccess;
> +    }
>  
>      nev = GetTouchOwnershipEvents(events, dev, ti, mode,
>                                    ti->listeners[0].listener, 0);
> -- 
> 1.7.8.3
> 


More information about the xorg-devel mailing list