Repo // Fix looped crashes with client apps on macOS 10.11-10.13.

This commit is contained in:
ShikiSuen 2022-08-20 23:09:02 +08:00
parent 84c3e6d274
commit cd0ea9563a
2 changed files with 3 additions and 6 deletions

View File

@ -415,12 +415,7 @@ public enum mgrPrefs {
// MARK: - Settings (Tier 2) // MARK: - Settings (Tier 2)
@UserDefault(key: UserDef.kUseIMKCandidateWindow.rawValue, defaultValue: false) @UserDefault(key: UserDef.kUseIMKCandidateWindow.rawValue, defaultValue: false)
static var useIMKCandidateWindow: Bool { static var useIMKCandidateWindow: Bool
didSet {
NSLog("vChewing App self-terminated due to enabling / disabling IMK candidate window.")
NSApplication.shared.terminate(nil)
}
}
@UserDefault(key: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue, defaultValue: false) @UserDefault(key: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue, defaultValue: false)
static var handleDefaultCandidateFontsByLangIdentifier: Bool static var handleDefaultCandidateFontsByLangIdentifier: Bool

View File

@ -47,6 +47,8 @@ struct suiPrefPaneDevZone: View {
LocalizedStringKey("Use IMK Candidate Window instead (will reboot the IME)"), LocalizedStringKey("Use IMK Candidate Window instead (will reboot the IME)"),
isOn: $selUseIMKCandidateWindow.onChange { isOn: $selUseIMKCandidateWindow.onChange {
mgrPrefs.useIMKCandidateWindow = selUseIMKCandidateWindow mgrPrefs.useIMKCandidateWindow = selUseIMKCandidateWindow
NSLog("vChewing App self-terminated due to enabling / disabling IMK candidate window.")
NSApplication.shared.terminate(nil)
} }
) )
Text(LocalizedStringKey("IMK candidate window is plagued with issues and incapabilities.")) Text(LocalizedStringKey("IMK candidate window is plagued with issues and incapabilities."))