xserver-multidpi/hw
Peter Hutterer 531ff40301 Add a "flags" field to DeleteInputDeviceRequest.
Some input drivers need to implement an internal hotplugging scheme for
dependent devices to provide multiple X devices off one kernel device file.
Such dependent devices can be added with NewInputDeviceRequest() but they are
not removed when the config backend calls DeleteInputDeviceRequest(),
leaving the original device to clean up.

Example of the wacom driver:

config/udev calls NewInputDeviceRequest("stylus")

wacom PreInit calls
        NewInputDeviceRequest("eraser")
        NewInputDeviceRequest("pad")
        NewInputDeviceRequest("cursor")
        PreInit finishes.

When the device is removed, the config backend only calls
DeleteInputDeviceRequest for "stylus". The driver needs to call
DeleteInputDeviceRequest for the dependent devices eraser, pad and cursor to
clean up properly.
However, when the server terminates, DeleteInputDeviceRequest is called for
all devices - the driver must not remove the dependent devices to avoid
double-frees. There is no method for the driver to detect why a device is
being removed, leading to elaborate guesswork and some amount of wishful
thinking.

Though the input driver's UnInit already supports flags, they are unused.
This patch uses the flags to supply information where the
DeleteInputDeviceRequest request originates from, allowing a driver to
selectively call DeleteInputDeviceRequest when necessary.

Also bumps XINPUT ABI.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-25 17:47:32 -07:00
..
dmx Add a "flags" field to DeleteInputDeviceRequest. 2010-05-25 17:47:32 -07:00
kdrive Add a "flags" field to DeleteInputDeviceRequest. 2010-05-25 17:47:32 -07:00
vfb vfb: Remove dead variable and header file 2010-05-21 12:49:46 -07:00
xfree86 Add a "flags" field to DeleteInputDeviceRequest. 2010-05-25 17:47:32 -07:00
xnest xnest: Don't ignore errors from DeviceCursorInitialize. 2010-05-25 09:05:22 -07:00
xquartz Add a "flags" field to DeleteInputDeviceRequest. 2010-05-25 17:47:32 -07:00
xwin Find windows GL wrapper files in $(srcdir) instead of . 2010-05-20 14:35:14 -07:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00