xserver/hw/dmx
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
..
config Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
doc Convert LinuxDoc documents to DocBook/XML 2010-05-20 11:29:52 -07:00
examples Rename xdmx client to dmxinfo 2010-03-22 00:45:46 -05:00
glxProxy Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
input Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
Xdmx.man Add Distributed Multihead X (DMX) support 2004-06-30 20:06:56 +00:00
dmx-config.h dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmx.c Eliminate boilerplate around client->noClientException. 2010-05-13 17:14:07 -07:00
dmx.h unifdef -B -DRENDER to always include RENDER code 2010-04-19 09:26:10 -07:00
dmx_glxvisuals.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmx_glxvisuals.h Update to SGI FreeB 2.0. 2008-09-19 12:02:28 -04:00
dmxcb.c Centralize declaration of ConnectionInfo. 2008-08-20 13:14:34 -04:00
dmxcb.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxclient.h unifdef -B -DRENDER to always include RENDER code 2010-04-19 09:26:10 -07:00
dmxcmap.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxcmap.h devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxcursor.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxcursor.h Add an array of integers for use as per-screen cursor private keys. 2008-08-27 19:27:13 -04:00
dmxdpms.c xace: restore the old SaveScreens function and introduce new API, since the 2007-11-19 16:59:34 -05:00
dmxdpms.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxextension.c dmxBERestoreRenderGlyph was passing wrong value to free 2010-05-08 09:51:03 -07:00
dmxextension.h dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxfont.c Eliminate boilerplate around client->noClientException. 2010-05-13 17:14:07 -07:00
dmxfont.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxgc.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxgc.h devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxgcops.c dmx: don't include panoramiXsrv.h if building w/o Xinerama 2009-09-16 11:44:08 +10:00
dmxgcops.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxinit.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxinit.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxinput.c Add a "flags" field to DeleteInputDeviceRequest. 2010-05-25 17:47:32 -07:00
dmxinput.h dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxlog.c Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac 2008-04-25 16:49:35 +09:30
dmxlog.h Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac 2008-04-25 16:49:35 +09:30
dmxpict.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxpict.h devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxpixmap.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxpixmap.h Merge branch 'master' into XACE-SELINUX 2007-11-05 19:08:36 -05:00
dmxprop.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxprop.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxscrinit.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxscrinit.h devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxshadow.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxshadow.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxstat.c dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxstat.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxsync.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxsync.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxvisual.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxvisual.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxwindow.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
dmxwindow.h unifdef -B -DRENDER to always include RENDER code 2010-04-19 09:26:10 -07:00