From 31bbc434021a5cf69423b81de5e7eb3bc6a0c8f9 Mon Sep 17 00:00:00 2001 From: tisfeng Date: Mon, 9 Dec 2024 22:44:37 +0800 Subject: [PATCH] fix: allow foxit to use force get selected text --- Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift | 4 ++-- Easydict/objc/EventMonitor/EZEventMonitor.m | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift b/Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift index 8495d2b5e..5f00f0471 100644 --- a/Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift +++ b/Easydict/Swift/View/SettingView/Tabs/TabView/AboutTab.swift @@ -26,8 +26,6 @@ struct SettingsAboutTab: View { struct AboutTab: View { // MARK: Internal - @Environment(\.openWindow) private var openWindow - var body: some View { VortexViewReader { proxy in GeometryReader { geometry in @@ -119,6 +117,8 @@ struct AboutTab: View { // MARK: Private + @Environment(\.openWindow) private var openWindow + private var appName: String { Bundle.main.infoDictionary?["CFBundleName"] as? String ?? "" } diff --git a/Easydict/objc/EventMonitor/EZEventMonitor.m b/Easydict/objc/EventMonitor/EZEventMonitor.m index 51fcaf99e..82f163066 100644 --- a/Easydict/objc/EventMonitor/EZEventMonitor.m +++ b/Easydict/objc/EventMonitor/EZEventMonitor.m @@ -629,6 +629,7 @@ - (BOOL)shouldUseSimulatedCopyWithAXError:(AXError)axError { @"com.microsoft.VSCode", // VSCode @"com.jetbrains.intellij.ce", // IDEA @"com.foxitsoftware.FoxitReaderLite", // Foxit PDF Reader + @"com.foxit-software.Foxit.PDF.Reader", // 福昕PDF阅读器 https://www.foxitsoftware.cn/pdf-reader/ ], // Some Apps return kAXErrorAttributeUnsupported -25205, but actually has selected text.