Subject: Re: X on macppc
To: Dan Winship <danw@MIT.EDU>
From: Erik Bertelsen <erik@mediator.uni-c.dk>
List: port-macppc
Date: 05/24/1999 14:57:20
On Fri, May 21, 1999 at 07:01:49PM -0400, Dan Winship wrote:
> The option-arrow hack is in the adb code. If you're using both an adb
> keyboard and an adb mouse, it looks like you can make it work by
> adding "flags 0x1" to the aed line in your kernel config. (Untested:
> I'm having issues getting -current kernels to work, and I don't have
> any adb stuff anyway.)
> 
> If you're using USB just go buy a 3-button USB mouse. They're cheap.

I'm on an original G3 Desktop machine -- no USB here.

The problem in the idea of adding "flags 0x1" is as far as I can tell
that on macppc, the ADB device is not open when X running, which causes
aed_handoff to drop the faked mouse button event.

On a mac68k, the X server opens /dev/adb in OsVendorInit in xsrc/xc/programs/
Xserver/hw/netbsd/mac68k/macInit.c. On macppc, .../macppc/macppcInit.c
OsVendorInit looks quite different as it is set up to handle wscons.

Debug prints in sys/arch/macppc/dev/aed.c reveals that aedopen apparently
never gets called and that aed_sc->sc_open is not set.

I'm not in a position to tell whether /dev/adb should be opened directly
by the X server, or whether the wscons code should do it (or aed_handoff
be rewritten...).

However, a solution is needed for people with 1-button ADB mice.

- regards
Erik Bertelsen