On Wed, Oct 19, 2011 at 7:01 PM, Ping Cheng <pingli...@gmail.com> wrote:
> normalizePressure crashes if wcmMaxZ is 0.

The crash must depend on version of Xorg your using.  I'd assume I'd
see this crash as well now that I'm using the Bamboo driver that
removed pressure support for touch... but I don't.

Change makes sense to me:

Acked-by: Chris Bagwell <ch...@cnpbagwell.com>

>
> Signed-off-by: Ping Cheng <pi...@wacom.com>
> ---
>  src/wcmCommon.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index c3c8907..08b3283 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -1168,17 +1168,17 @@ static void commonDispatchDevice(WacomCommonPtr 
> common, unsigned int channel,
>                        return;
>        }
>
> -       if (IsPen(priv) || IsTouch(priv))
> +       if (IsPen(priv))
> +               common->wcmPenInProx = filtered.proximity;
> +
> +       if ((IsPen(priv) || IsTouch(priv)) && common->wcmMaxZ)
>        {
>                priv->minPressure = rebasePressure(priv, &filtered);
>                filtered.pressure = normalizePressure(priv, &filtered);
>                if (IsPen(priv))
>                        filtered.buttons = setPressureButton(priv, &filtered);
>                filtered.pressure = applyPressureCurve(priv,&filtered);
> -               if (IsPen(priv))
> -                       common->wcmPenInProx = filtered.proximity;
>        }
> -
>        else if (IsCursor(priv) && !priv->oldCursorHwProx)
>        {
>                /* initial current max distance for Intuos series */
> --
> 1.7.6.4
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Ciosco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to