From: Chris Bagwell <[email protected]>

Placing a stylus in relative mode (xinput set-mode x RELATIVE)
would result in unexpected mouse movement when a button click
occured.  Similar reports given for mouse tool which defaults
to relative mode on its own.

I believe the memset()'s zeros were being scaled to non-zero
values for acceleration inside xserver and causing the movement.

Change to not post these valuators during button posts since they
were just posted.

Signed-off-by: Chris Bagwell <[email protected]>
---
 src/wcmCommon.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index 0636169..498daf1 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -599,14 +599,16 @@ wcmSendNonPadEvents(InputInfoPtr pInfo, const 
WacomDeviceState *ds,
                        xf86PostMotionEventP(pInfo->dev, is_absolute(pInfo),
                                             first_val, num_vals,
                                             VCOPY(valuators, num_vals));
-                       /* For relative events, reset the axes as
-                        * we've already moved the device by the
-                        * relative amount. Otherwise, a button
+                       /* For relative events, do not repost
+                        * the valuators.  Otherwise, a button
                         * event in sendCommonEvents will move the
                         * axes again.
                         */
                        if (!is_absolute(pInfo))
-                               memset(valuators, 0, num_vals);
+                       {
+                               first_val = 0;
+                               num_vals = 0;
+                       }
                }
 
                sendCommonEvents(pInfo, ds, first_val, num_vals, valuators);
-- 
1.7.3.4


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to