Use the bigger of ABS_X/ABS_Y fuzz as the default value for suppress to
avoid erroneous movements. The kernel-announced fuzz for I4 tablets is 4, so
we get plenty of erroneous movement, specificially on the puck cursor.

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 man/wacom.man | 8 +++++---
 src/wcmUSB.c  | 6 ++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/man/wacom.man b/man/wacom.man
index 98dec37..622bf73 100644
--- a/man/wacom.man
+++ b/man/wacom.man
@@ -88,9 +88,11 @@ This option is mandatory.
 sets the position increment under which not to transmit coordinates.
 This entry must be specified only in the first Wacom subsection if you have
 multiple devices for one tablet. If you don't specify this entry, the default 
-value,  which is 2, will be used. To disable suppression, the entry should be 
-specified as 0.  When suppress is defined,  an event will be sent only when at 
-least one of the following conditions is met:
+value will be used. This default value is retrieved from the kernel, or 2 if
+the kernel does not provide a fuzz value.
+To disable suppression, the entry should be specified as 0.  When
+suppress is defined,  an event will be sent only when at least one of the
+following conditions is met:
 
         the change between the current X coordinate and the previous one is
 greater than suppress;
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index 980dac3..8ee0078 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -534,6 +534,9 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
 #endif
        }
 
+       if (absinfo.fuzz > 0)
+               common->wcmSuppress = absinfo.fuzz;
+
        /* max y */
        if (ioctl(pInfo->fd, EVIOCGABS(ABS_Y), &absinfo) < 0)
        {
@@ -567,6 +570,9 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
 #endif
        }
 
+       if (absinfo.fuzz > 0)
+               common->wcmSuppress = max(absinfo.fuzz, common->wcmSuppress);
+
        /* max finger strip X for tablets with Expresskeys
         * or physical X for touch devices in hundredths of a mm */
        if (ISBITSET(abs, ABS_RX) &&
-- 
1.8.1.4


------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to