tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Mouse cursor jumping to the left of the screen with native xorg



Hey folks --

I tried to adapt the old pkgsrc xorg 1.3 patch to native xorg, no clue if it's correct but at least my mouse cursor has stopped jumping to the left of the screen.

Any thoughts?

Cheers,
Jared
Index: getevents.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xorg-server/dist/dix/getevents.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 getevents.c
--- getevents.c 31 Jul 2008 19:49:25 -0000      1.1.1.1
+++ getevents.c 16 Oct 2008 00:01:08 -0000
@@ -252,25 +252,10 @@ acceleratePointer(DeviceIntPtr pDev, int
         /* modeled from xf86Events.c */
         if (pDev->ptrfeed->ctrl.threshold) {
             if ((abs(dx) + abs(dy)) >= pDev->ptrfeed->ctrl.threshold) {
-                pDev->valuator->dxremaind = ((float)dx *
-                                             (float)(pDev->ptrfeed->ctrl.num)) 
/
-                                             (float)(pDev->ptrfeed->ctrl.den) +
-                                            pDev->valuator->dxremaind;
-                if (px) {
-                    *px = (int)pDev->valuator->dxremaind;
-                    pDev->valuator->dxremaind = pDev->valuator->dxremaind -
-                                                (float)(*px);
-                }
-
-                pDev->valuator->dyremaind = ((float)dy *
-                                             (float)(pDev->ptrfeed->ctrl.num)) 
/
-                                             (float)(pDev->ptrfeed->ctrl.den) +
-                                            pDev->valuator->dyremaind;
-                if (py) {
-                    *py = (int)pDev->valuator->dyremaind;
-                    pDev->valuator->dyremaind = pDev->valuator->dyremaind -
-                                                (float)(*py);
-                }
+               valuators[0] = (dx * pDev->ptrfeed->ctrl.num) /
+                              pDev->ptrfeed->ctrl.den;
+               valuators[1] = (dy * pDev->ptrfeed->ctrl.num) /
+                              pDev->ptrfeed->ctrl.den;
             }
         }
         else {


Home | Main Index | Thread Index | Old Index