Input: Don't enable devices when we open them

Thanks to Xi's braindead design, it's otherwise impossible to query input
devices without enabling them.  Hurrah.
This commit is contained in:
Daniel Stone 2007-08-01 03:29:12 +03:00
parent 0a31db14b7
commit cd8e99e56e
2 changed files with 0 additions and 15 deletions

View File

@ -98,7 +98,6 @@ int
ProcXOpenDevice(ClientPtr client) ProcXOpenDevice(ClientPtr client)
{ {
xInputClassInfo evbase[numInputClasses]; xInputClassInfo evbase[numInputClasses];
Bool enableit = FALSE;
int j = 0; int j = 0;
int status = Success; int status = Success;
xOpenDeviceReply rep; xOpenDeviceReply rep;
@ -121,7 +120,6 @@ ProcXOpenDevice(ClientPtr client)
SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice); SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice);
return Success; return Success;
} }
enableit = TRUE;
} }
OpenInputDevice(dev, client, &status); OpenInputDevice(dev, client, &status);
@ -129,8 +127,6 @@ ProcXOpenDevice(ClientPtr client)
SendErrorToClient(client, IReqCode, X_OpenDevice, 0, status); SendErrorToClient(client, IReqCode, X_OpenDevice, 0, status);
return Success; return Success;
} }
if (enableit && dev->inited && dev->startup)
(void)EnableDevice(dev);
rep.repType = X_Reply; rep.repType = X_Reply;
rep.RepType = X_OpenDevice; rep.RepType = X_OpenDevice;

View File

@ -204,17 +204,6 @@ OpenInputDevice(DeviceIntPtr dev,
if (!dev->inited) if (!dev->inited)
ActivateDevice(dev); ActivateDevice(dev);
if (!dev->public.on) {
if (EnableDevice(dev)) {
dev->startup = FALSE;
}
else {
ErrorF("couldn't enable device %s\n", dev->name);
*status = BadDevice;
return;
}
}
*status = Success; *status = Success;
} }