From cd0ea9563a3f3d976726cc9dfe575ea4e6ea9f38 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 20 Aug 2022 23:09:02 +0800 Subject: [PATCH] Repo // Fix looped crashes with client apps on macOS 10.11-10.13. --- Source/Modules/IMEModules/mgrPrefs.swift | 7 +------ Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index 37451445..5391a5b9 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -415,12 +415,7 @@ public enum mgrPrefs { // MARK: - Settings (Tier 2) @UserDefault(key: UserDef.kUseIMKCandidateWindow.rawValue, defaultValue: false) - static var useIMKCandidateWindow: Bool { - didSet { - NSLog("vChewing App self-terminated due to enabling / disabling IMK candidate window.") - NSApplication.shared.terminate(nil) - } - } + static var useIMKCandidateWindow: Bool @UserDefault(key: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue, defaultValue: false) static var handleDefaultCandidateFontsByLangIdentifier: Bool diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift index 50809c62..266c2e4d 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift @@ -47,6 +47,8 @@ struct suiPrefPaneDevZone: View { LocalizedStringKey("Use IMK Candidate Window instead (will reboot the IME)"), isOn: $selUseIMKCandidateWindow.onChange { 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."))