________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of Donald Kayser
Sent: Friday, August 28, 2009 8:17 AM
To: [email protected]
Subject: xf86-input-mouse signed/unsigned issue with Microsoft protocol

I am developing under a PPC embedded system running 2.6.30.2 Linux, xserver 
from debian distribution of 7.3+19, xf86-input-mouse 1.3.0. I have a custom 
board that I am sending Microsoft mouse 3 byte protocol through a pipe to the 
input of xserver via the mouse driver. I was able to make small movements, all 
positive, but if I moved negative, the mouse would jump a large amount in the 
positive direction. I checked out from git and built the mouse driver and 
turned on debug to find out and it is not accepting negative numbers correctly 
in the case of PROT_MS. By changing the cast on lines 1304/1305 in mouse.c from 
(char) to (signed char), I fixed the problem. I don't know if this exists on 
other (non PPC) platforms.  I also noticed the potential for the same problem 
in a few more places. I am using gcc-4.3.


Chars are unsigned on ppc and, I believe s390.
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to