patch to get latest XFree 4.0 snapshot (xf3918) to work on ppc with r128

Kevin Hendricks khendricks at
Fri Feb 25 14:19:34 EST 2000

Hi Kostas,

> I have been looking at my mouse problems in XF 3.9.18 and put some debug
> statements into Xserver/hw/xfree86/input/mouse/mouse.c to look at the raw
> characters being read from /dev/usbmouse.

Well I have been looking at xfree86/input/mouse/mouse.c

The problem was in MouseReadInput().


This is some of the most whacked code I have ever seen.  Setting up tables with
wierd parameters just to try and use the exact same routine to handle all mice
regardless of how many characters they return, whether serial or bus or

This in just simply incredibly bad coding.  It is unmaintainable since any
change will have to impact other mice or simply need another bad hack to work
around it.

The code they were using deliberately resulted in out of sync characters after
the very first call.

I hacked away most of the MouseReadInput() code and now things work as expected.

I will try to clean up my changes and put back most of what I hacked out so
that they can be integrated into the xfree86 tree in time for xfree 4.0 but
someone should really simplify it and stop trying to make one routine work for
every case (the tables simply could have pointed to individual routines).


Kevin B. Hendricks
Associate Professor of Operations and Information Technology
Richard Ivey School of Business, University of Western Ontario
London, Ontario  N6A-3K7  CANADA
khendricks at, (519) 661-3874, fax: 519-661-3959

** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list