[Xorg] Input device hotplug
Egbert Eich
eich at pdx.freedesktop.org
Mon Jul 5 10:20:21 PDT 2004
Kristian Høgsberg writes:
...
>
> It wasn't my intention that all clients should use the hotplug requests,
> only the input device hotplug daemon. Toolkit support should not be
> necessary either, you would use the XInput Xlib API directly. This way
> you still have system dependent functionality in one central place, it's
> just not in the X server but in the hotplug daemon.
>
OK.
> ...
>
> > What I remember right now:
> > 1.a. Clearify meaning of device type and device name in the XDeviceInfo
> > struct. Type is an Atom form a fixed list.
> > b. A device type touchpad is meaningless as it doesn't describe what
> > device (stylus, eraser, mouse etc.) is attached.
>
> Yeah, this bit from xf86Xinput.c:xf86ActivateDevice() doesn't help:
>
> local->atom = MakeAtom(local->name,
> strlen(local->name),
> TRUE);
> AssignTypeAndName (dev, local->atom, local->name);
>
> i.e. it creates a atom for the device name and uses it as the type :-/.
Yes, that is completely bogus.
> Here's output from a modified xsetpointer -l:
>
> "Mouse0" XID=3, type=Mouse0 (115) [XPointer]
> "keyboard" XID=4, type=NULL (0) [XKeyboard]
> "stylus" XID=2, type=stylus (114) [XExtensionDevice]
> "eraser" XID=1, type=eraser (113) [XExtensionDevice]
> "cursor" XID=0, type=cursor (112) [XExtensionDevice]
>
> > 2. Make device controls more flexible. A device control currently
> > is an XID. Make it an Atom.
>
> Can this be done in a backward compatible way or would we need a new
> request? Btw, why is the device control both in the
> XChangeDeviceControl() argument list and in the XDeviceControl struct?
> That's redundant...
>
control is an XID in the XDeviceControl structure which is pretty much
an unsigned long. This would match an Atom which is also an unsigned
long. However in XGetDeviceControl() and XChangeDeviceControl() it is
an int :-/ On the wire its a 32bit container. This would not create
problems.
Egbert.
More information about the xorg
mailing list