On Mon, Dec 13, 2010 at 12:03:59PM -0800, Ping Cheng wrote:
> 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?

x/y are special, because I don't think any client or device can afford to
have axes 0 and 1 as something other than x/y.

other axes are different, the labels are there to tell a client what axis
this could stand for. what this commit is trying to avoid is that potential
UIs claim that the pad supports pressure (based on the axis label) when it
doesn't.

> > 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.

the pad itself is relative (and forced relative too). I'll likely change
this back to absolute (I think it used to be absolute and got changed due to
a server bug) but right now I'm struggling with getting the right valuators
through to the clients.
And I'm not sure yet if the issue really is that complicated or if my brain
is just throwing up roadblocks.

Cheers,
  Peter

> 
> 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
> >
> >
> >
> 

------------------------------------------------------------------------------
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