summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorRemigiusz Marcinkiewicz <enleth@enleth.com>2007-04-11 00:38:16 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2007-04-11 00:38:16 +0300
commitaecbc712144dd1aaf462bd758821438b1d22d957 (patch)
treef8e864602c111ad0c6260f7930c82d8ad5cf6f17 /hw
parent4f05f9591e5492c72f3856bd7a2ff13378f59f2b (diff)
Input: Allow a pointer to a device to be returned in NIDR
Allow a pointer to the first device added to be returned, so we know which device(s) were added by the NIDR call.
Diffstat (limited to 'hw')
-rw-r--r--hw/kdrive/src/kinput.c8
-rw-r--r--hw/xfree86/common/xf86Xinput.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index a9a743ba8..7edcc5106 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2307,7 +2307,7 @@ ChangeDeviceControl(register ClientPtr client, DeviceIntPtr pDev,
}
int
-NewInputDeviceRequest(InputOption *options)
+NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
{
InputOption *option = NULL;
KdPointerInfo *pi = NULL;
@@ -2372,6 +2372,12 @@ NewInputDeviceRequest(InputOption *options)
}
}
+ if (pi) {
+ *pdev = pi->dixdev;
+ } else if(ki) {
+ *pdev = ki->dixdev;
+ }
+
return Success;
}
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index f662c170e..6ebb087cf 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -315,7 +315,7 @@ AddOtherInputDevices()
#endif
int
-NewInputDeviceRequest (InputOption *options)
+NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
{
IDevRec *idev = NULL;
InputDriverPtr drv = NULL;
@@ -409,6 +409,7 @@ NewInputDeviceRequest (InputOption *options)
if (dev->inited && dev->startup)
EnableDevice(dev);
+ *pdev = dev;
return Success;
unwind: