From 43609bd89994b66b5f778847536ecbf868f608a1 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 17 Aug 2022 18:44:02 +0800 Subject: [PATCH] ctlIME // Stop Spotlight from covering the IMKCandidates window. --- .../ControllerModules/ctlInputMethod_HandleDisplay.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Modules/ControllerModules/ctlInputMethod_HandleDisplay.swift b/Source/Modules/ControllerModules/ctlInputMethod_HandleDisplay.swift index 989a0e6e..db8f98a1 100644 --- a/Source/Modules/ControllerModules/ctlInputMethod_HandleDisplay.swift +++ b/Source/Modules/ControllerModules/ctlInputMethod_HandleDisplay.swift @@ -142,6 +142,11 @@ extension ctlInputMethod { ctlInputMethod.ctlCandidateCurrent.delegate = self ctlInputMethod.ctlCandidateCurrent.reloadData() + // Spotlight 視窗會擋住 IMK 選字窗,所以需要特殊處理。 + if let ctlCandidateCurrent = ctlInputMethod.ctlCandidateCurrent as? ctlCandidateIMK { + ctlCandidateCurrent.perform(Selector(("setWindowLevel:")), with: client.windowLevel() + 1000) + } + ctlInputMethod.ctlCandidateCurrent.visible = true var lineHeightRect = NSRect(x: 0.0, y: 0.0, width: 16.0, height: 16.0)