Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.584 diff -u -2 -0 -r1.584 ChangeLog --- xc/ChangeLog 8 Dec 2004 05:52:20 -0000 1.584 +++ xc/ChangeLog 13 Dec 2004 02:03:09 -0000 @@ -1,20 +1,31 @@ +2004-12-12 Roland Mainz + * xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c + Bugzilla #1688 (https://bugs.freedesktop.org/show_bug.cgi?id=1688) + attachment #1147 (https://bugs.freedesktop.org/attachment.cgi?id=1147): + Fix the current implementation to make it possible to slow down the + mouse pointer or use arbitrary fractions (without running into + rounding error issues). The change is using the same method of + preserving rounding errors that the exponential method is already + using. + Patch by Jan Brunner . + 2004-12-08 Roland Mainz * xc/programs/Xserver/mi/miinitext.c Bugzilla #1361 (https://bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #1287 (https://bugs.freedesktop.org/attachment.cgi?id=1287): Avoid DRI initalisation when the Xfree86-DRI extension was turned off. Patch by Kristian Høgsberg . 2004-12-08 Roland Mainz * xc/programs/Xserver/mi/miinitext.c Bugzilla #1361 (https://bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #938 (https://bugs.freedesktop.org/attachment.cgi?id=938): Allow more extensions to be enabled/disabled. 2004-12-07 Roland Mainz * xc/extras/Xpm/lib/xpm.h Bugzilla #830 (https://bugs.freedesktop.org/show_bug.cgi?id=830): Fix libXpm header (xpm.h) to use the X11 function begin/end marker macros (_XFUNCPROTOBEGIN, _XFUNCPROTOEND) instead of homegrown (native) C++ code. Index: xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c,v retrieving revision 1.1.1.2 diff -u -2 -0 -r1.1.1.2 xf86Xinput.c --- xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c 25 Nov 2003 19:28:33 -0000 1.1.1.2 +++ xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c 13 Dec 2004 02:03:44 -0000 @@ -915,44 +915,49 @@ valuator[loop%6] = va_arg(var,int); if (loop % 6 == 5 || loop == num_valuators - 1) { num = loop % 6 + 1; /* * Adjust first two relative valuators */ if (!is_absolute && num_valuators >= 2 && loop_start == 0) { dx = valuator[0]; dy = valuator[1]; /* * Accelerate */ if (device->ptrfeed && device->ptrfeed->ctrl.num) { /* modeled from xf86Events.c */ if (device->ptrfeed->ctrl.threshold) { if ((abs(dx) + abs(dy)) >= device->ptrfeed->ctrl.threshold) { - valuator[0] = (dx * device->ptrfeed->ctrl.num) / - device->ptrfeed->ctrl.den; - valuator[1] = (dy * device->ptrfeed->ctrl.num) / - device->ptrfeed->ctrl.den; + local->dxremaind = ((float)dx * (float)(device->ptrfeed->ctrl.num)) / + (float)(device->ptrfeed->ctrl.den) + local->dxremaind; + valuator[0] = (int)local->dxremaind; + local->dxremaind = local->dxremaind - (float)valuator[0]; + + local->dyremaind = ((float)dy * (float)(device->ptrfeed->ctrl.num)) / + (float)(device->ptrfeed->ctrl.den) + local->dyremaind; + valuator[1] = (int)local->dyremaind; + local->dyremaind = local->dyremaind - (float)valuator[1]; } } else if (dx || dy) { mult = pow((float)(dx*dx+dy*dy), ((float)(device->ptrfeed->ctrl.num) / (float)(device->ptrfeed->ctrl.den) - 1.0) / 2.0) / 2.0; if (dx) { local->dxremaind = mult * (float)dx + local->dxremaind; valuator[0] = (int)local->dxremaind; local->dxremaind = local->dxremaind - (float)valuator[0]; } if (dy) { local->dyremaind = mult * (float)dy + local->dyremaind; valuator[1] = (int)local->dyremaind; local->dyremaind = local->dyremaind - (float)valuator[1]; } } DBG(6, ErrorF("xf86PostMotionEvent acceleration v0=%d v1=%d\n", valuator[0], valuator[1]));