[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: RE: xf86-input-mouse signed/unsigned issue with Microsoft protocol
From: "Wichmann, Mats D" <mats.d.wichmann () intel ! com>
Date: 2009-08-28 14:28:02
Message-ID: FE028D69955796489B510CE43DBBE80371E206F8 () rrsmsx503 ! amr ! corp ! intel ! com
[Download RAW message or body]
________________________________
From: xorg-bounces@lists.freedesktop.org [mailto:xorg-bounces@lists.freedes=
ktop.org] On Behalf Of Donald Kayser
Sent: Friday, August 28, 2009 8:17 AM
To: xorg@lists.freedesktop.org
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 custo=
m 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 moveme=
nts, all positive, but if I moved negative, the mouse would jump a large am=
ount 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 num=
bers correctly in the case of PROT_MS. By changing the cast on lines 1304/1=
305 in mouse.c from (char) to (signed char), I fixed the problem. I don't k=
now if this exists on other (non PPC) platforms. I also noticed the potent=
ial for the same problem in a few more places. I am using gcc-4.3.
Chars are unsigned on ppc and, I believe s390.
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5848" name=GENERATOR></HEAD>
<BODY
style="WORD-WRAP: break-word; webkit-nbsp-mode: space; webkit-line-break: after-white-space">
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xorg-bounces@lists.freedesktop.org
[mailto:xorg-bounces@lists.freedesktop.org] <B>On Behalf Of </B>Donald
Kayser<BR><B>Sent:</B> Friday, August 28, 2009 8:17 AM<BR><B>To:</B>
xorg@lists.freedesktop.org<BR><B>Subject:</B> xf86-input-mouse signed/unsigned
issue with Microsoft protocol<BR></FONT><BR></DIV>
<DIV></DIV>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.
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=799052614-28082009><FONT face=Arial color=#0000ff size=2>Chars
are unsigned on ppc and, I believe s390.
</FONT></SPAN></DIV></BODY></HTML>
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
--===============1757211801==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic