On Thu, Oct 10, 2013 at 04:14:29PM -0700, Ping Cheng wrote:
> kernel 2.6.38 introduced INPUT_PROP_DIRECT to indicate a device is
> a direct touch (onscreen pointer) device. Use it so we do not
> have to add individual devcies for that feature.
> 
> When INPUT_PROP_DIRECT was added, INPUT_PROP_MAX and EVIOCGPROP were
> also defined. So, we only need to make sure INPUT_PROP_DIRECT is defined.
> 
> Signed-off-by: Ping Cheng <pi...@wacom.com>
> ---
> v2: Incorporate review comments from Peter Hutterer
> ---
>  src/wcmValidateDevice.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
> index 1a5e722..0dbfdb4 100644
> --- a/src/wcmValidateDevice.c
> +++ b/src/wcmValidateDevice.c
> @@ -308,6 +308,15 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo)
>                       break;
>       }
>  
> +#ifdef INPUT_PROP_DIRECT
> +{
> +     unsigned long prop[NBITS(INPUT_PROP_MAX)] = {0};
> +
> +     ioctl(pInfo->fd, EVIOCGPROP(sizeof(prop)), prop);
> +     if (ISBITSET(prop, INPUT_PROP_DIRECT))
> +             TabletSetFeature(priv->common, WCM_LCD);
> +}
> +#endif

merged with a minor change - indented the whole thing by one tab

Cheers,
   Peter

>       if (ISBITSET(common->wcmKeys, BTN_TOOL_PEN))
>               TabletSetFeature(priv->common, WCM_PEN);
>  
> -- 
> 1.8.1.2
> 

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to