XChangeDeviceControl/XGetDeviceControl ?

Daniel Stone daniel at fooishbar.org
Mon Apr 17 14:57:43 PDT 2006


On Mon, Apr 17, 2006 at 11:08:17PM +0400, Andrew Zabolotny wrote:
> 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.

And ioctls are now more-or-less deprecated in favour of sysfs.  Go
figure, I guess ...

> > 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.

If there are hundreds of such structures, we're already doing something
wrong.  What use cases do you have in mind?

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

I found that odd, since it was in the subject of your mail and all, heh.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20060418/66f624c6/attachment.pgp>


More information about the xorg mailing list