XChangeDeviceControl/XGetDeviceControl ?

Daniel Stone daniel at freedesktop.org
Sun Apr 16 11:06:08 PDT 2006


On Sun, Apr 16, 2006 at 10:57:01PM +0400, Andrew Zabolotny wrote:
> What would be the correct way to change/query some settings of a
> extended input device? By looking into the Wacom tablet driver that
> comes with Xorg, it looks like it uses a horrible hack in order to be
> able to dynamically change settings like active area boundaries,
> orientation and so on: the XChangeDeviceControl in reality supports
> just a single parameter DEVICE_RESOLUTION, so it 'pretends' to
> be changing the resolution (while in reality it changes his own
> private settings).
> 
> This hack, however, has a number of problems: first, the device must
> have at least two axes, then the values for every axis 'resolution' is
> sanity checked inside the X11 core, and this call doesn't provide any
> feedback so you can't query private device settings.
> 
> Wouldn't it be good to have a generic call like Unix ioctl(), which
> doesn't have any knowledge of the input/output data structure: the only
> thing it needs is the length of input/output data? Or I missed
> something?

Uhm, XChangeDeviceControl has n+1 parameters.  One is the control (e.g.
DEVICE_RESOLUTION, DEVICE_TOUCHSCREEN, DEVICE_CORE, ...), and the other
n is the arbitrary data structure associated with the control.  You can
do what you like with it.

If the Wacom guys need to use their own controls, they should get in
touch with us, and we can get their specific needs integrated into a
later version of Xorg.  Having an abundance of modules like SISCTRL[0]
is not useful in the long term.  Having widely configurable input, is.

Cheers,
Daniel

[0]: No slight to Thomas: there's no equivalent DIX or DDX-level
     functionality that even comes close to doing what SISCTRL does.
-------------- 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/20060416/86946417/attachment.pgp>


More information about the xorg mailing list