Input: Add DeleteInputDeviceRequest
Add DIDR, which asks the DDX to remove a device, analogous to NewInputDeviceRequest. Only implemented for XFree86 at the moment.
This commit is contained in:
parent
7b82a836c6
commit
82962bbae2
12
Xi/stubs.c
12
Xi/stubs.c
|
@ -230,3 +230,15 @@ NewInputDeviceRequest(InputOption *options)
|
||||||
{
|
{
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* Caller: configRemoveDevice (and others)
|
||||||
|
*
|
||||||
|
* Remove the specified device previously added.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
DeleteInputDeviceRequest(DeviceIntPtr dev)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -212,7 +212,7 @@ configRemoveDevice(DBusMessage *message, DBusMessageIter *iter,
|
||||||
* already been removed. */
|
* already been removed. */
|
||||||
OsBlockSignals();
|
OsBlockSignals();
|
||||||
ProcessInputEvents();
|
ProcessInputEvents();
|
||||||
RemoveDevice(pDev);
|
DeleteInputDeviceRequest(pDev);
|
||||||
OsReleaseSignals();
|
OsReleaseSignals();
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -2374,3 +2374,8 @@ NewInputDeviceRequest(InputOption *options)
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DeleteInputDeviceRequest(DeviceIntPtr pDev)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -371,8 +371,11 @@ xf86DeleteInput(InputInfoPtr pInp, int flags)
|
||||||
if (pInp->drv)
|
if (pInp->drv)
|
||||||
pInp->drv->refCount--;
|
pInp->drv->refCount--;
|
||||||
|
|
||||||
|
/* This should *really* be handled in drv->UnInit(dev) call instead */
|
||||||
|
#if 0
|
||||||
if (pInp->private)
|
if (pInp->private)
|
||||||
xfree(pInp->private);
|
xfree(pInp->private);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Remove the entry from the list. */
|
/* Remove the entry from the list. */
|
||||||
if (pInp == xf86InputDevs)
|
if (pInp == xf86InputDevs)
|
||||||
|
|
|
@ -427,6 +427,26 @@ unwind:
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DeleteInputDeviceRequest(DeviceIntPtr pDev)
|
||||||
|
{
|
||||||
|
LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate;
|
||||||
|
InputDriverPtr drv = pInfo->drv;
|
||||||
|
IDevRec *idev = pInfo->conf_idev;
|
||||||
|
|
||||||
|
RemoveDevice(pDev);
|
||||||
|
|
||||||
|
if(drv->UnInit)
|
||||||
|
drv->UnInit(drv, pInfo, 0);
|
||||||
|
else
|
||||||
|
xf86DeleteInput(pInfo, 0);
|
||||||
|
|
||||||
|
xfree(idev->driver);
|
||||||
|
xfree(idev->identifier);
|
||||||
|
xf86optionListFree(idev->commonOptions);
|
||||||
|
xfree(idev);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* convenient functions to post events
|
* convenient functions to post events
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -446,6 +446,8 @@ extern DeviceIntPtr LookupDeviceIntRec(
|
||||||
/* Implemented by the DDX. */
|
/* Implemented by the DDX. */
|
||||||
extern int NewInputDeviceRequest(
|
extern int NewInputDeviceRequest(
|
||||||
InputOption *options);
|
InputOption *options);
|
||||||
|
extern void DeleteInputDeviceRequest(
|
||||||
|
DeviceIntPtr dev);
|
||||||
|
|
||||||
extern void DDXRingBell(
|
extern void DDXRingBell(
|
||||||
int volume,
|
int volume,
|
||||||
|
|
Loading…
Reference in New Issue