On Sun, Dec 12, 2010 at 7:30 PM, Peter Hutterer
<[email protected]> wrote:
> The pad doesn't actually send events on the third axis, it simply acts as a
> filler so that client's don't misinterpret the actual axis the device has.

Then what about the first and second axes? Pad does not send x and y
events either. Shouldn't we add the filter for x and y as well?

> Initialize it as relative axis, because the rest of the pad is relative too.

Well, depends on which "rest" we are refering to. The fouth to sixth
valuators are all in absolute mode.

Ping

> Signed-off-by: Peter Hutterer <[email protected]>
> ---
>  src/xf86Wacom.c |   30 +++++++++++++++++++++++-------
>  1 files changed, 23 insertions(+), 7 deletions(-)
>
> diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
> index 5f02f6d..d4cdae8 100644
> --- a/src/xf86Wacom.c
> +++ b/src/xf86Wacom.c
> @@ -520,18 +520,34 @@ static int wcmDevInit(DeviceIntPtr pWcm)
>
>                /* Rotation rotates the Max X and Y */
>                wcmRotateTablet(pInfo, common->wcmRotate);
> -       }
>
> -       /* pressure normalized to FILTER_PRESSURE_RES */
> -       InitValuatorAxisStruct(pInfo->dev, 2,
> +               /* pressure normalized to FILTER_PRESSURE_RES */
> +               InitValuatorAxisStruct(pInfo->dev, 2,
>  #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
> -               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE),
> +                               
> XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE),
>  #endif
> -               0, FILTER_PRESSURE_RES, 1, 1, 1
> +                               0, FILTER_PRESSURE_RES, 1, 1, 1
>  #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
> -               , Absolute
> +                               , Absolute
>  #endif
> -               );
> +                               );
> +
> +       } else {
> +               /* The pad doesn't have a pressure axis, so initialise third
> +                * axis as unknown relative axis on the pad. This way, we
> +                * can leave the strip/abswheel axes on later axes and don't
> +                * run the danger of clients misinterpreting the axis info
> +                */
> +               InitValuatorAxisStruct(pInfo->dev, 2,
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
> +                               None,
> +#endif
> +                               -1, -1, 0, -1, -1
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
> +                               , Relative
> +#endif
> +                               );
> +       }
>
>        if (IsCursor(priv))
>        {
> --
> 1.7.3.3
>
>
> ------------------------------------------------------------------------------
> Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
> new data types, scalar functions, improved concurrency, built-in packages,
> OCI, SQL*Plus, data movement tools, best practices and more.
> http://p.sf.net/sfu/oracle-sfdev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to