Register a callback via `XRegisterIMInstantiateCallback()` to detect whether the input method is available again.