Multiple clicks with touchscreen

Peter Hutterer peter.hutterer at who-t.net
Thu Aug 11 21:42:43 PDT 2011


On Thu, Aug 11, 2011 at 09:30:04PM -0700, Jeremy Huddleston wrote:
> Just to confirm, this is what you want, right:
 
correct. thanks.

Cheers,
  Peter
 
> From 8b0e57a508c70923bd0b1c03f28026b6bbb03f44
> From: Peter Hutterer <peter.hutterer at who-t.net>
> Date: Thu, 21 Apr 2011 17:35:55 +1000
> Subject: [PATCH] dix: only transform valuators when we need them.
> 
> Unconditionally drop the valuators back into the mask when they were there
> in the first place. Otherwise, sending identical coordinates from the driver
> on a translated device causes the valuator mask to be alternatively
> overwritten with the translated value or left as-is. This leads to the
> device jumping around between the translated and the original position.
> 
> The same could be achieved with a valuator_mask_unset() combination.
> 
> Testcase:
> xsetwacom set "device name" MapToOutput VGA1
> Then press a button on the device, cursor jumps between the two positions.
> 
> Introduced in 31737fff08ec19b394837341d5e358ec401f5cd8
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> Reviewed-by: Daniel Stone <daniel at fooishbar.org>
> Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  dix/getevents.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 55 insertions(+), 2 deletions(-)
> 
> diff --git a/dix/getevents.c b/dix/getevents.c
> index 0fa8046..7afd330 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -1065,9 +1065,10 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
>  
>      pixman_f_transform_point(&dev->transform, &p);
>  
> -    if (lround(p.v[0]) != dev->last.valuators[0])
> +    if (valuator_mask_isset(mask, 0))
>          valuator_mask_set(mask, 0, lround(p.v[0]));
> -    if (lround(p.v[1]) != dev->last.valuators[1])
> +
> +    if (valuator_mask_isset(mask, 1))
>          valuator_mask_set(mask, 1, lround(p.v[1]));
>  }



More information about the xorg mailing list