I must admit this patch is really confusing me.  I'm not sure if it
works stand alone but not really worth it changing it even if it
doesn't.

By the time I get to patches 8, 9, and 13 everything is understandable
by just looking at patch though and overrides this patch anyways.

Overall, very nice cleanup and much easier to understand now.

In the past, I toyed with sending "pad" buttons of Bamboo along with
the "touch" device.  It was this tricky area of code that made me run
away screaming from that idea.  Now, with this refactor, maybe its not
so hard a job to do.

Reviewed-by: Chris Bagwell <[email protected]>

Chris

On Wed, Dec 15, 2010 at 4:06 PM, Peter Hutterer
<[email protected]> wrote:
> We claim the pad is a relative device, but only because we had troubles with
> the cursor landing at 0/0 in the past. Pretend we're still a relative
> device, but post the values as absolute ones to the server.
>
> Note that the device mode is to tell how the device _behaves_, it doesn't
> specify how the device sends valuators. Thus, a relative device may only
> post absolute coordinates and vice versa.
>
> This applies to motion events only, button events for the scroll ring still
> have the wrong valuator information.
>
> Signed-off-by: Peter Hutterer <[email protected]>
> ---
>  src/wcmCommon.c |   32 ++++++++++++++++----------------
>  1 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index 79caffa..70ea9ed 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -670,25 +670,25 @@ void wcmSendEvents(InputInfoPtr pInfo, const 
> WacomDeviceState* ds)
>                priv->oldButtons = 0;
>        }
>
> -       if (!is_absolute(pInfo))
> +       if (type != PAD_ID)
>        {
> -               x -= priv->oldX;
> -               y -= priv->oldY;
> -               z -= priv->oldZ;
> -               if (IsCursor(priv))
> -               {
> -                       v3 -= priv->oldRot;
> -                       v4 -= priv->oldThrottle;
> -               } else
> +               if (!is_absolute(pInfo))
>                {
> -                       v3 -= priv->oldTiltX;
> -                       v4 -= priv->oldTiltY;
> +                       x -= priv->oldX;
> +                       y -= priv->oldY;
> +                       z -= priv->oldZ;
> +                       if (IsCursor(priv))
> +                       {
> +                               v3 -= priv->oldRot;
> +                               v4 -= priv->oldThrottle;
> +                       } else
> +                       {
> +                               v3 -= priv->oldTiltX;
> +                               v4 -= priv->oldTiltY;
> +                       }
> +                       v5 -= priv->oldWheel;
>                }
> -               v5 -= priv->oldWheel;
> -       }
>
> -       if (type != PAD_ID)
> -       {
>                /* coordinates are ready we can send events */
>                if (is_proximity)
>                {
> @@ -756,7 +756,7 @@ void wcmSendEvents(InputInfoPtr pInfo, const 
> WacomDeviceState* ds)
>                        /* xf86PostMotionEvent is only needed to post the 
> valuators
>                         * It should NOT move the cursor.
>                         */
> -                       xf86PostMotionEventP(pInfo->dev, is_absolute(pInfo), 
> 3, 3, valuators);
> +                       xf86PostMotionEventP(pInfo->dev, TRUE, 3, 3, 
> valuators);
>                }
>                else
>                {
> --
> 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
>

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