xfree86: don't attempt to enable and disable non-DIX devices

Don't try to enable and disable devices with no entry in the DIX, such as
the evdev brain.
This commit is contained in:
Daniel Stone 2006-11-02 04:12:55 +02:00 committed by Daniel Stone
parent 64139c1950
commit 1d65429a9e

View File

@ -887,7 +887,8 @@ xf86VTSwitch()
*/
pInfo = xf86InputDevs;
while (pInfo) {
DisableDevice(pInfo->dev);
if (pInfo->dev)
DisableDevice(pInfo->dev);
pInfo = pInfo->next;
}
#endif /* !__UNIXOS2__ */
@ -927,8 +928,10 @@ xf86VTSwitch()
#if !defined(__UNIXOS2__)
pInfo = xf86InputDevs;
while (pInfo) {
xf86ReleaseKeys(pInfo->dev);
EnableDevice(pInfo->dev);
if (pInfo->dev) {
xf86ReleaseKeys(pInfo->dev);
EnableDevice(pInfo->dev);
}
pInfo = pInfo->next;
}
/* XXX HACK */
@ -991,8 +994,10 @@ xf86VTSwitch()
#if !defined(__UNIXOS2__)
pInfo = xf86InputDevs;
while (pInfo) {
xf86ReleaseKeys(pInfo->dev);
EnableDevice(pInfo->dev);
if (pInfo->dev) {
xf86ReleaseKeys(pInfo->dev);
EnableDevice(pInfo->dev);
}
pInfo = pInfo->next;
}
/* XXX HACK */