On Thu, Nov 12, 2009 at 03:18:10PM +0100, Bartosz Brachaczek wrote: > We should process all the deltas reported by a relative motion device, > otherwise some devices such as A4Tech X-750F or similar may trigger a > situation when the `v` array contains random values (it isn't > initialized anywhere) and later we process them and in effect the mouse > cursor "jumps" on the screen. > I'm not sure why, but we also must be sure that the `first` and `last` > variables reflect the axis map, otherwise the mouse cursor "jumps" on > the screen when clicking mouse buttons in some rare cases reported by > Bartek Iwaniec on Bugzilla. That's why a simple initialization of the > `v` array with zeros isn't sufficient. > > X.Org Bug 24737 <http://bugs.freedesktop.org/show_bug.cgi?id=24737> > > Signed-off-by: Bartosz Brachaczek <[email protected]> > --- > src/evdev.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/evdev.c b/src/evdev.c > index 06ea83b..81a0bd5 100644 > --- a/src/evdev.c > +++ b/src/evdev.c > @@ -375,7 +375,7 @@ EvdevProcessValuators(InputInfoPtr pInfo, int > v[MAX_VALUATORS], int *num_v, > for (i = 0; i < REL_CNT; i++) > { > int map = pEvdev->axis_map[i]; > - if (pEvdev->delta[i] && map != -1) > + if (map != -1) > { > v[map] = pEvdev->delta[i]; > if (map < first) > --
pushed, thanks for the patch! Cheers, Peter _______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
