[PATCH 1/2] Only scale direct device touch coordinates

Peter Hutterer peter.hutterer at who-t.net
Thu Jan 19 20:14:02 PST 2012


On Wed, Jan 18, 2012 at 06:04:13PM -0800, Chase Douglas wrote:
> Indirect touch devices provide valuator values in pure device
> coordinates. They also don't need to be fixed up for screen crossings.
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  dix/getevents.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/getevents.c b/dix/getevents.c
> index d0014e6..2946b16 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -1867,7 +1867,12 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
>      if (need_rawevent)
>          set_raw_valuators(raw, &mask, raw->valuators.data);
>  
> -    scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny);
> +    /* Indirect device touch coordinates are not used for cursor positioning.
> +     * They are merely informational, and are provided in device coordinates.
> +     * The device sprite is used for positioning instead, and it is already
> +     * scaled. */
> +    if (t->mode == XIDirectTouch)
> +        scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny);
>      if (emulate_pointer)
>          scr = positionSprite(dev, Absolute, &mask,
>                               &devx, &devy, &screenx, &screeny);
> -- 
> 1.7.8.3

merged, thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list