diff options
author | Ping Cheng <pinglinux@gmail.com> | 2013-10-10 16:14:29 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-10-14 10:36:56 +1000 |
commit | 2bd942fa6dcaf02c1b825878c3d89badd9319a7f (patch) | |
tree | fc272d2ac6ca32d680779d0476fe4654708d3999 | |
parent | b154cfa766ce9497379a5cfa38fff64e7d89440b (diff) |
Decide WCM_LCD by kernel property
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 <pingc@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/wcmValidateDevice.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c index 1a5e722..9c0294b 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 if (ISBITSET(common->wcmKeys, BTN_TOOL_PEN)) TabletSetFeature(priv->common, WCM_PEN); |