Check VCP's and VCK's ids when searching for a new device id.
Both VCP and VCK are not in the inputInfo.devices list anymore, so we need to check them separately. If we don't do this, we end up re-using ids 0 and 1, causing all sorts of grief for clients.
This commit is contained in:
parent
5e43910929
commit
b043a18450
|
@ -99,6 +99,10 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart)
|
|||
|
||||
/* Find next available id */
|
||||
memset(devind, 0, sizeof(char)*MAX_DEVICES);
|
||||
if (inputInfo.keyboard)
|
||||
devind[inputInfo.keyboard->id]++;
|
||||
if (inputInfo.pointer)
|
||||
devind[inputInfo.pointer->id]++;
|
||||
for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next)
|
||||
devind[devtmp->id]++;
|
||||
for (devtmp = inputInfo.off_devices; devtmp; devtmp = devtmp->next)
|
||||
|
|
Loading…
Reference in New Issue