I really like this patch to clean up output of xinput list-props and
the other similar patch.  This is a good patch that I'd commit as-is.

I do notice now additional issues related to pressure curve setting
that would be nice to fix.  I can help if we all agree on below
updates.

* Below, the origin code is hardcoding default values to 0, 0, 100,
100.  It should be defaulting to values stored in priv->nPressCtrl[]
to be safe (which is 0, 0, 100, 100 right now).

* Logic validating values are between 0 and 100 is duplicated in
wcmXCommand.c, wcmValidateDevice.c, and wcmFilter.c.  It would be nice
to give wcmSetPressureCurve a return value and centralize error
checking there.

* Logic in wcmValidateDevice.c checks for (!IsCurser(priv) &&
!(IsTouch(priv)).  Your check for (IsSytlus(priv) && IsEraser(priv))
is easier to understand the intent.  It would be nice to align both
places.

* It would be nice to add a note to man pages that PressCurve applies
only to stylus and eraser.

Chris

On Tue, Feb 23, 2010 at 11:07 PM, Peter Hutterer
<peter.hutte...@who-t.net> wrote:
> The mouse doesn't really have a pressure curve. And the pad doesn't either,
> so no need for this property.
>
> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
> ---
>  src/wcmXCommand.c |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
> index b8bdd92..08567bd 100644
> --- a/src/wcmXCommand.c
> +++ b/src/wcmXCommand.c
> @@ -182,11 +182,13 @@ void InitWcmDeviceProperties(LocalDevicePtr local)
>        values[0] = common->wcmRotate;
>        prop_rotation = InitWcmAtom(local->dev, WACOM_PROP_ROTATION, 8, 1, 
> values);
>
> -       values[0] = 0;
> -       values[1] = 0;
> -       values[2] = 100;
> -       values[3] = 100;
> -       prop_pressurecurve = InitWcmAtom(local->dev, 
> WACOM_PROP_PRESSURECURVE, 32, 4, values);
> +       if (IsStylus(priv) || IsEraser(priv)) {
> +               values[0] = 0;
> +               values[1] = 0;
> +               values[2] = 100;
> +               values[3] = 100;
> +               prop_pressurecurve = InitWcmAtom(local->dev, 
> WACOM_PROP_PRESSURECURVE, 32, 4, values);
> +       }
>
>        values[0] = common->tablet_id;
>        values[1] = priv->old_serial;
> --
> 1.6.6.1
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to