diff --git a/Xi/stubs.c b/Xi/stubs.c index d425fe9d4..40cd02fe1 100644 --- a/Xi/stubs.c +++ b/Xi/stubs.c @@ -226,7 +226,7 @@ ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, * */ int -NewInputDeviceRequest(InputOption *options) +NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev) { return BadValue; } 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: diff --git a/include/input.h b/include/input.h index 1e657099c..b399d3ad1 100644 --- a/include/input.h +++ b/include/input.h @@ -445,7 +445,8 @@ extern DeviceIntPtr LookupDeviceIntRec( /* Implemented by the DDX. */ extern int NewInputDeviceRequest( - InputOption *options); + InputOption *options, + DeviceIntPtr *dev); extern void DeleteInputDeviceRequest( DeviceIntPtr dev);