The core can decide to close an input device (e.g. during a
server reset). Make sure we respect this by forgetting about
the device and recreating it again later.
case DEVICE_OFF:
pDev->on = FALSE;
break;
-#if 0
case DEVICE_CLOSE:
+ singleton.pointerDev = NULL;
break;
-#endif
}
return Success;
case DEVICE_OFF:
pDev->on = FALSE;
break;
+ case DEVICE_CLOSE:
+ singleton.keyboardDev = NULL;
+ break;
}
return Success;
void InputDevice::InitInputDevice(void)
{
- if (initialized)
+ if ((pointerDev != NULL) || (keyboardDev != NULL))
return;
- initialized = true;
-
#if XORG < 17
pointerDev = AddInputDevice(
#if XORG >= 16
#endif
private:
- bool initialized;
DeviceIntPtr keyboardDev;
DeviceIntPtr pointerDev;