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.
This commit is contained in:
parent
4f05f9591e
commit
aecbc71214
|
@ -226,7 +226,7 @@ ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
NewInputDeviceRequest(InputOption *options)
|
NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
|
||||||
{
|
{
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2307,7 +2307,7 @@ ChangeDeviceControl(register ClientPtr client, DeviceIntPtr pDev,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
NewInputDeviceRequest(InputOption *options)
|
NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
|
||||||
{
|
{
|
||||||
InputOption *option = NULL;
|
InputOption *option = NULL;
|
||||||
KdPointerInfo *pi = NULL;
|
KdPointerInfo *pi = NULL;
|
||||||
|
@ -2372,6 +2372,12 @@ NewInputDeviceRequest(InputOption *options)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pi) {
|
||||||
|
*pdev = pi->dixdev;
|
||||||
|
} else if(ki) {
|
||||||
|
*pdev = ki->dixdev;
|
||||||
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,7 +315,7 @@ AddOtherInputDevices()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
NewInputDeviceRequest (InputOption *options)
|
NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
|
||||||
{
|
{
|
||||||
IDevRec *idev = NULL;
|
IDevRec *idev = NULL;
|
||||||
InputDriverPtr drv = NULL;
|
InputDriverPtr drv = NULL;
|
||||||
|
@ -409,6 +409,7 @@ NewInputDeviceRequest (InputOption *options)
|
||||||
if (dev->inited && dev->startup)
|
if (dev->inited && dev->startup)
|
||||||
EnableDevice(dev);
|
EnableDevice(dev);
|
||||||
|
|
||||||
|
*pdev = dev;
|
||||||
return Success;
|
return Success;
|
||||||
|
|
||||||
unwind:
|
unwind:
|
||||||
|
|
|
@ -445,7 +445,8 @@ extern DeviceIntPtr LookupDeviceIntRec(
|
||||||
|
|
||||||
/* Implemented by the DDX. */
|
/* Implemented by the DDX. */
|
||||||
extern int NewInputDeviceRequest(
|
extern int NewInputDeviceRequest(
|
||||||
InputOption *options);
|
InputOption *options,
|
||||||
|
DeviceIntPtr *dev);
|
||||||
extern void DeleteInputDeviceRequest(
|
extern void DeleteInputDeviceRequest(
|
||||||
DeviceIntPtr dev);
|
DeviceIntPtr dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user