mouse stuck on left side of screen

Jeremy C. Reed reed at reedmedia.net
Tue Nov 29 19:50:58 PST 2005


On Tue, 29 Nov 2005, Adam Jackson wrote:

>> I moved my mouse and I saw it moving up and down on my left side of the
>> display. I could move it fast up and down, but didn't seem to go to the
>> right.

> The only bell this is ringing is regarding the new mouse acceleration code.
> There was a bug in some versions of FreeBSD (maybe Open and Net too) where
> FPU context wasn't being properly saved or restored on signals, so since the
> mouse code runs from SIGIO occasionally you'd get bogus FPU state and the
> mouse would slam against an edge.
>
> I think Matthieu said they had a regression case for it now, might want to
> make sure netbsd passes it.

I received an off-list email pointing me to NetBSD PR 30418  (fixed by 
NetBSD's pkgsrc/xorg-libs/patches/patch-bl). This NetBSD PR led me to
xorg bug #3113 which says "the mouse pointer will reset itself to the left 
side of the screen. Unless I move the pointer very slowly, it will keep 
going back to the left edge of the screen."

I do not see the same 
fix in xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c revision 1.7

The fix in NetBSD's pkgsrc is:

--- programs/Xserver/hw/xfree86/common/xf86Xinput.c.orig	2005-05-16 23:20:56.000000000 +0900
+++ programs/Xserver/hw/xfree86/common/xf86Xinput.c	2005-05-16 23:23:25.000000000 +0900
@@ -932,15 +932,10 @@
  		    /* modeled from xf86Events.c */
  		    if (device->ptrfeed->ctrl.threshold) {
  			if ((abs(dx) + abs(dy)) >= device->ptrfeed->ctrl.threshold) {
-			    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];
+			    valuator[0] = (dx * device->ptrfeed->ctrl.num) /
+					   device->ptrfeed->ctrl.den;
+			    valuator[1] = (dy * device->ptrfeed->ctrl.num) /
+					   device->ptrfeed->ctrl.den;
  			}
  		    }
  		    else if (dx || dy) {

I have not tested this myself.

I do not know what triggered my problem in the first place so I am not 
sure how to test this.


  Jeremy C. Reed

  	  	 	 BSD News, BSD tutorials, BSD links
 	  	 	 http://www.bsdnewsletter.com/



More information about the xorg mailing list