Moving os-support/*/*_mouse.c to mouse input module?

Matthieu Herrb matthieu.herrb at laas.fr
Thu Jul 21 17:03:05 EST 2005


Alan Coopersmith wrote:
> We had a brief discussion this week on moving the OS-specific mouse 
> files to the mouse input module, since it's all that uses it (and
> because the current sun_mouse.c has a dependency on the headers in
> the mouse input module, so can't build in the modular tree, but
> that could be argued to be a misuse of those headers).
> 
> I've poked at this a bit and it seems a bit more complicated than I
> originally thought, because I forgot that it would require converting
> that code to run properly in a loadable module, and some platforms
> may require calls or libraries (like libusb) not usually available in
> loadable modules.
> 
> I've attached the patch to the monolithic tree that I have so far - I've
> only converted the sun_mouse.c and built on Solaris though.   Any
> thoughts on whether this should be continued or abandoned?

This breaks the idea that X server modules only use a well-specified set 
of functions exported by the X server to the modules.

The os-specific mouse code is supposed to provide the mouse related part 
of the API to the mouse input module (and to other input modules too).

This will break any 3rd party input module that relies on the current API.

Moreover, moving the os-specific code into the mouse driver will 
encourage other input modules to directly talk to os-specific functions 
to access the hardware and prevent them from being portable to different 
systems. (I know that this is already done today by some os-specific 
input modules, but I'd better see these module fixed to use a OS-neutral 
API to access the underlying hardware).
-- 
Matthieu Herrb


More information about the xorg-modular mailing list