On Wed, Feb 17, 2010 at 08:18:42PM -0600, ch...@cnpbagwell.com wrote:
> From: Chris Bagwell <ch...@cnpbagwell.com>
> 
> Setting relative mode default for bamboo was delayed only
> because common->tablet_id wasn't available early enough.
> Now that its value is around, move setting default values to
> single location.
> 
> Signed-off-by: Chris Bagwell <ch...@cnpbagwell.com>
> ---
>  src/wcmConfig.c         |   14 +++++++++++---
>  src/wcmValidateDevice.c |    8 --------
>  2 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/src/wcmConfig.c b/src/wcmConfig.c
> index b5d07f2..fbc8f04 100644
> --- a/src/wcmConfig.c
> +++ b/src/wcmConfig.c
> @@ -176,7 +176,8 @@ error:
>       return 0;
>  }
>  
> -static int wcmAllocateByType(LocalDevicePtr local, const char *type)
> +static int wcmAllocateByType(LocalDevicePtr local, const char *type,
> +                          int tablet_id)
>  {
>       int rc = 0;
>  
> @@ -191,7 +192,14 @@ static int wcmAllocateByType(LocalDevicePtr local, const 
> char *type)
>       if (xf86NameCmp(type, "stylus") == 0)
>               rc = wcmAllocate(local, XI_STYLUS, ABSOLUTE_FLAG|STYLUS_ID);
>       else if (xf86NameCmp(type, "touch") == 0)
> -             rc = wcmAllocate(local, XI_TOUCH, ABSOLUTE_FLAG|TOUCH_ID);
> +     {
> +             int flags = TOUCH_ID;
> +
> +             if (!(tablet_id >= 0xd0 && tablet_id <= 0xd3))

uh-oh, that's confusing. I actually started writing a reply on how the
condition is now broken before I saw the "!" :) 
How about the inverse of the condition?

                if (tablet_id < 0xd0 || tablet_id > 0xd3)

if you're fine with that, I'll fix it up locally and push it.

Cheers,
  Peter

------------------------------------------------------------------------------
Download Intel&reg; 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