summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xi/stubs.c14
-rw-r--r--config/config.c2
-rw-r--r--hw/dmx/dmxinput.c5
-rw-r--r--hw/kdrive/src/kinput.c5
-rw-r--r--hw/xfree86/common/xf86Xinput.c15
-rw-r--r--hw/xquartz/darwinXinput.c15
-rw-r--r--include/input.h1
7 files changed, 57 insertions, 0 deletions
diff --git a/Xi/stubs.c b/Xi/stubs.c
index 39bee7c27..27848a2f6 100644
--- a/Xi/stubs.c
+++ b/Xi/stubs.c
@@ -143,3 +143,17 @@ DeleteInputDeviceRequest(DeviceIntPtr dev)
{
RemoveDevice(dev, TRUE);
}
+
+/****************************************************************************
+ *
+ * Caller: configRemoveDevice (and others)
+ *
+ * Remove any traces of the input device specified in config_info.
+ * This is only necessary if the ddx keeps information around beyond
+ * the NewInputDeviceRequest/DeleteInputDeviceRequest
+ *
+ */
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+}
diff --git a/config/config.c b/config/config.c
index 1fb368c12..fb60295ae 100644
--- a/config/config.c
+++ b/config/config.c
@@ -107,6 +107,8 @@ remove_devices(const char *backend, const char *config_info)
if (dev->config_info && strcmp(dev->config_info, config_info) == 0)
remove_device(backend, dev);
}
+
+ RemoveInputDeviceTraces(config_info);
}
BOOL
diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c
index 4ccb43903..d201034c6 100644
--- a/hw/dmx/dmxinput.c
+++ b/hw/dmx/dmxinput.c
@@ -123,3 +123,8 @@ void
DeleteInputDeviceRequest(DeviceIntPtr pDev)
{
}
+
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+}
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 2c396246c..8b08747a6 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2302,3 +2302,8 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
{
RemoveDevice(pDev, TRUE);
}
+
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+}
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 009527285..39de498a3 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -1119,6 +1119,21 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
input_unlock();
}
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+ PausedInputDevicePtr d, tmp;
+
+ xorg_list_for_each_entry_safe(d, tmp, &new_input_devices_list, node) {
+ const char *ci = xf86findOptionValue(d->pInfo->options, "config_info");
+ if (!ci || strcmp(ci, config_info) != 0)
+ continue;
+
+ xorg_list_del(&d->node);
+ free(d);
+ }
+}
+
/*
* convenient functions to post events
*/
diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c
index 3efaa2ca4..fea7e921e 100644
--- a/hw/xquartz/darwinXinput.c
+++ b/hw/xquartz/darwinXinput.c
@@ -147,3 +147,18 @@ DeleteInputDeviceRequest(DeviceIntPtr dev)
{
DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev);
}
+
+/****************************************************************************
+ *
+ * Caller: configRemoveDevice (and others)
+ *
+ * Remove any traces of the input device specified in config_info.
+ * This is only necessary if the ddx keeps information around beyond
+ * the NewInputDeviceRequest/DeleteInputDeviceRequest
+ *
+ */
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+ DEBUG_LOG("RemoveInputDeviceTraces(%s)\n", config_info);
+}
diff --git a/include/input.h b/include/input.h
index c7b1e913c..bb58b2200 100644
--- a/include/input.h
+++ b/include/input.h
@@ -635,6 +635,7 @@ extern _X_EXPORT int NewInputDeviceRequest(InputOption *options,
InputAttributes * attrs,
DeviceIntPtr *dev);
extern _X_EXPORT void DeleteInputDeviceRequest(DeviceIntPtr dev);
+extern _X_EXPORT void RemoveInputDeviceTraces(const char *config_info);
extern _X_EXPORT void DDXRingBell(int volume, int pitch, int duration);