fix(keyboard): close librime on every hide to avoid 0xdead10cc kills
Hiding the keyboard on the typing surface kept librime's LevelDB userdb LOCK open in the App Group, so RunningBoard killed the suspended extension. Finalize the runtime on every hide (and when schema selection fails); viewWillAppear re-prepares Rime in about 30-50 ms.
This commit is contained in:
@@ -269,9 +269,11 @@ public final class KeyboardViewController: UIInputViewController {
|
||||
if !preserve {
|
||||
prepareSurfaceForNextPresentation()
|
||||
}
|
||||
if state.surface != .typing {
|
||||
deactivateTypingSurface()
|
||||
}
|
||||
// Always finalize librime on hide, even on the typing surface: its
|
||||
// LevelDB userdb holds `Rime/UserData/*.userdb/LOCK` in the App Group,
|
||||
// and RunningBoard kills a suspended extension holding that lock
|
||||
// (0xdead10cc). `viewWillAppear` re-prepares Rime (~30–50 ms).
|
||||
deactivateTypingSurface()
|
||||
if preserve {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user