[RFC] X Input Driver specification

Peter Hutterer mailinglists at who-t.net
Tue Apr 10 16:29:28 PDT 2007


On 05/04/2007, at 06:07 , Magnus Vigerlöf wrote:
> As there doesn't seem to be a specification (or at least an up-to- 
> date one) on
> what the different initialization stages for an Input Device should  
> do I've
> continued on the one on the wiki [1]. My changes are around the  
> calls made
> for set up/removal of the input device, from both the device driver  
> and
> xserver point-of-view.
>
> [1] http://xorg.freedesktop.org/wiki/XOrgInputDriverSpec

Thanks. This email was a very interesting read. We should have more  
of this general overview emails and wikipages.
>
> - Server side
> if function returns a pointer to an InputInfoRec but haven't set
> XI86_CONFIGURED, UnInit is called if defined. If not,  
> xf86DeleteInput is
> called to make some kind of cleanup. For devices that should be  
> hotpluggable
> the UnInit function is required if there shouldn't be any resource  
> leaks.

this causes some grief with the current evdev driver, which does its  
own hotplugging. yay.

> - X-server side
> If the function return anything but 'Success' the device *can not*  
> be used.
> DEVICE_ON will never be called. It will however be listed as an  
> extension
> device in X, thus making it visible, but never available.

And if you try to OpenDevice, you are guaranteed to get a BadDevice  
back. Why listing the in the ListInputDevices, I'll leave as an  
exercise to the reader...

> - Server side
> If the function is not defined, xf86DeleteInput will be called  
> instead. But
> that will most likely result in a memory leak as no device-private  
> structures
> will be deallocated.

If the function is not defined and results in a memory leak, find the  
driver developer and keep shouting at him/her until it is defined.  
Preferably from a close distance and with the aid of a blunt instrument.

Cheers,
   Peter

--
Multi-Pointer X Server
http://wearables.unisa.edu.au/mpx





More information about the xorg mailing list