Subject: Re: X and wscons
To: Lennart Augustsson <augustss@cs.chalmers.se>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 07/11/1998 11:38:37
On Sat, 11 Jul 1998 15:52:33 +0200 (MET DST) 
 Lennart Augustsson <augustss@cs.chalmers.se> wrote:

 > Is anyone working on fixing X so that it uses wscons instead
 > of handling the keyboard and mouse the current way?

I am looking at doing some of this incrementally.  I made a quick hack
so that X will work with wscons in PCVT compat mode, and it should Just Work
if you have the wscons compat options enabled, and use a serial mouse.

Matthias pointed out to me that you can still use the "pms" driver instead
of the "psm" driver to use a ps/2 mouse...

But, the right thing to do is to actually fix XFree86.  Unfortunately, this
is not going to be an easy task :(

The way mouse handling is structured in XFree86 is ... well, not that nice,
and it is going to be a bit difficult to put proper wsmouse handling in there.
I spent a few hours looking/hacking the other night, and gave up in despair :(

Part of the problem lies in how XFree86 uses the "private data" pointer in
the X device structure... wsmouse needs to store state (because it's event
oriented), but regular mouse handling in XFree86 does not (because it's
structured around receiving composite data from the mouse device), so it
uses it to point back at another generic X structure.

Unfortunately, NetBSD needs to support BOTH the XFree86 model and the wscons
model, because it needs to work with serial mice :-)

Aie yie yie!

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 940 5942