Input device design (3)
Russell Shaw
rjshaw at netspace.net.au
Mon Aug 29 21:24:22 PDT 2005
Johnson, Charles F wrote:
> Russell's comments is exactly what I've been thinking of:
>
> **********************
> * X Server *
> ********************** *******************
> * X Config Interface * <---- * X Config Client * -> DBUS -> HAL
> ********************** *******************
>
> In this setup, the X Config Client (XCC) would handle:
>
> 1. Input Device Discovery
> 2. Input Device Hot Plug & Removal Tracking
> 3. Notifications to X Server on Events in #2
>
> This enables:
> 1. Removal from the X server knowledge of OS & platform specific
> hot plug mechanisms.
> (Linux can have its own, Solaris its own, etc.).
> 2. Makes it possible that the X server may not have to run as root
> anymore. (Assuming the XCC passes a fd to the server.)
> 3. Allows the X server to evolve independent of the
> OS & platform configuration detection mechanism.
>
> Please let me know if this is too simplistic view of the world.
Hi,
How about:
System interface agents.
+----------+ +----------------------------------------+
| X server |<--- /dev/Xinput <--- | One or more X event generators |
| |---> /dev/Xoutput ---> | and readers. |
+----------+ | X events for mouse button presses |
| and movement etc, |
| X events for keypress, keyrelease etc, |
| X events for hardware changes. |
| Requests from server to reset or query |
| hardware. |
+----------------------------------------+
All the configuration and hardware knowledge can be taken out of the X server.
The server only knows keypress/release etc, and knows nothing about keycodes.
Changing a keyboard or mouse only causes a "hardware change" X event to be
written to the /dev/Xinput fifo for the X server to read and act upon if
neccessary, such as relaying the event to clients. The X server or clients
could respond with a "hardware query" event that gets written to /dev/Xoutput
for the system interface agents to respond to if neccessary.
More information about the xorg
mailing list