XChangeDeviceControl/XGetDeviceControl ?

Andrew Zabolotny anpaza at mail.ru
Mon Apr 17 12:08:17 PDT 2006


On Mon, 17 Apr 2006 10:32:21 +0300
Daniel Stone <daniel at fooishbar.org> wrote:

> > Too bad there's no way to use that in a generic way; that would make
> > prototyping and developing stuff a lot easier.
> There's nothing for 'pass this structure up to the driver unmolested',
> though it could be trivially added; like I said, it's not something I
> want to encourage.
Why? The Unix ioctl is used a lot of years, and it has proven himself
a handy mechanism for exchanging data with the driver. I don't see a
big need for those structures to be officialy approved by the X.org
developers, this will certainly be an extra barrier for driver
developers, and they will anyway tend to overcome it in some perverted
way.

> You can either set the remaining values to -1 or NULL, or take the XKB
> approach of using a mask.
Well, what's bad here is that for every extra structure there must be a
serializer and a deserializer routine, and there are a lot of sanity
checks, at least for DEVICE_RESOLUTION. This means that when there
will be hundreds of such structures, the X11 code will grow with mostly
dead code. Having one generic way of passing data back and forth will
reduce the number of special cases by a lot, and specialized structures
will be required only for very special cases.

> Er, apps can get data back from the driver using XGetDeviceControl,
> surely?
Ah, sure. I somehow missed this call, thanks!

-- 
Greetings,
   Andrew



More information about the xorg mailing list