"Hover Click" and "TPCButton" are not the same meaning. TPCButton behaviour
is that Hover Click is off and vice versa. Hence the property inversion is
there on purpose.
Add some documentation to make this public.

This reverts commit f1ecd11c619f1f7eb7850dd2fb514307ca1dd1ce.

Conflicts:

        src/wcmXCommand.c

Reported-by: Michal Suchanek <hramr...@centrum.cz>
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 include/wacom-properties.h |    3 ++-
 src/wcmXCommand.c          |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/wacom-properties.h b/include/wacom-properties.h
index dfa454d..f0180d5 100644
--- a/include/wacom-properties.h
+++ b/include/wacom-properties.h
@@ -78,7 +78,8 @@
 /* 32 bit, 3 values, zoom, rotate, tap parameters */
 #define WACOM_PROP_GESTURE_PARAMETERS "Wacom Touch Gesture Parameters"
 
-/* BOOL, 1 value */
+/* BOOL, 1 value,
+   TRUE == hover click is enabled, FALSE == hover click disabled */
 #define WACOM_PROP_HOVER "Wacom Hover Click"
 
 /* Atom, 1 value, read-only */
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index 64ebb8d..00c6754 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -201,7 +201,7 @@ void InitWcmDeviceProperties(InputInfoPtr pInfo)
        prop_touch = InitWcmAtom(pInfo->dev, WACOM_PROP_TOUCH, 8, 1, values);
 
        if (IsStylus(priv)) {
-               values[0] = common->wcmTPCButton;
+               values[0] = !common->wcmTPCButton;
                prop_hover = InitWcmAtom(pInfo->dev, WACOM_PROP_HOVER, 8, 1, 
values);
        }
 
@@ -753,7 +753,7 @@ int wcmSetProperty(DeviceIntPtr dev, Atom property, 
XIPropertyValuePtr prop,
                        return BadMatch;
 
                if (!checkonly)
-                       common->wcmTPCButton = values[0];
+                       common->wcmTPCButton = !values[0];
 #ifdef DEBUG
        } else if (property == prop_debuglevels)
        {
-- 
1.7.4.2


------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to