[Xorg] XINPUT driver, hot-plugging, etc

Joe Krahn krahn at niehs.nih.gov
Wed May 26 15:32:05 PDT 2004


Some time ago, I started working with XINPUT devices in XFree86.
The whole XINPUT tree is pretty mangled, and has particularly poor
support for non-pointer devices. I realized how messed up it was
about the tim Jim Gettys took charge of XFree86-XINPUT, and his
X background is definitely better than mine. Unfortunately, he
also got delayed getting anything going in XINPUT.

One obvious problem is the severe lack of Hot-Plugging in XFree86.
However, the current XINPUT standard actually can support
Hot-Plugging. IRIX has done so for a long time. Essentially,
the XListInputDevices list is allowed to change. However,
it probably would be good to have a standard way to notify X
of lost/gained devices.

The single biggest problem I see with XINPUT is a badly designed
XChangeDeviceControl(). It could be OK in the current form IF the
controlType argument is changed to an Atom, and some general
purpose DeviceControl structures added. The current single enum
could be left for backwards compatibility with no real chance
of conflicting with an Atom ID.

In fact XChangeDeviceControl could be used as the method for
sending add/remove devices to the X Server.


Also, I have a possible view of network devices as having
a "driver module" which, instead of connecting to a device,
connects to an X-server that actually manages the device.
This keeps from having to create a new net protocol. But,
would the X Server protocol be efficient, and could one
run micro-servers which do nothing but run a device?

For example:

directly connected:  X-Server::device
net connected:       X-Server::device_client  <-->  MicroServer::device
remote Xserver:      X-Server::device_client  <-->  X-Server::device

The MicroServer::device unit would also be a good place to debug
driver code without crashing the X server.

This would make local, remote, and stand-alone devices fit
together well, and the existing protocol handles endian issues.

Joe Krahn






More information about the xorg mailing list