From ebaf44c7dcee63e9e95a410c254fc414c1828c73 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 6 Dec 2022 19:55:28 +0800 Subject: [PATCH] SessionCtl // Disable CandidateContextMenu for Spotlight and Raycast. --- Source/Modules/SessionCtl_Delegates.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Modules/SessionCtl_Delegates.swift b/Source/Modules/SessionCtl_Delegates.swift index 0d70bd38..15c5bc10 100644 --- a/Source/Modules/SessionCtl_Delegates.swift +++ b/Source/Modules/SessionCtl_Delegates.swift @@ -71,7 +71,11 @@ extension SessionCtl: InputHandlerDelegate { extension SessionCtl: CtlCandidateDelegate { 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 { !isVerticalTyping && PrefMgr.shared.showReverseLookupInCandidateUI }