SessionCtl // Disable CandidateContextMenu for Spotlight and Raycast.

This commit is contained in:
ShikiSuen 2022-12-06 19:55:28 +08:00
parent f4787c29da
commit ebaf44c7dc
1 changed files with 5 additions and 1 deletions

View File

@ -71,7 +71,11 @@ extension SessionCtl: InputHandlerDelegate {
extension SessionCtl: CtlCandidateDelegate { extension SessionCtl: CtlCandidateDelegate {
public var isCandidateState: Bool { state.isCandidateContainer } public var isCandidateState: Bool { state.isCandidateContainer }
public var isCandidateContextMenuEnabled: Bool { state.type == .ofCandidates } public var isCandidateContextMenuEnabled: Bool {
state.type == .ofCandidates || !clientBundleIdentifier.contains("com.apple.Spotlight")
|| !clientBundleIdentifier.contains("com.raycast.macos")
}
public var showReverseLookupResult: Bool { public var showReverseLookupResult: Bool {
!isVerticalTyping && PrefMgr.shared.showReverseLookupInCandidateUI !isVerticalTyping && PrefMgr.shared.showReverseLookupInCandidateUI
} }