diff --git a/share/macosx/keepassxc.entitlements b/share/macosx/keepassxc.entitlements index a637055858..be766090c0 100644 --- a/share/macosx/keepassxc.entitlements +++ b/share/macosx/keepassxc.entitlements @@ -8,8 +8,6 @@ production com.apple.security.network.client - com.apple.security.app-sandbox - com.apple.security.print com.apple.security.app-sandbox diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt index 1fdd85aa7e..9ae438db21 100644 --- a/src/cli/CMakeLists.txt +++ b/src/cli/CMakeLists.txt @@ -105,6 +105,8 @@ if(APPLE AND WITH_APP_BUNDLE) "@executable_path/../Frameworks/libyubikey.0.dylib" -change /usr/local/opt/ykpers/lib/libykpers-1.1.dylib "@executable_path/../Frameworks/libykpers-1.1.dylib" + -change /usr/local/opt/quazip/lib/libquazip.1.dylib + "@executable_path/../Frameworks/libquazip.1.dylib" keepassxc-cli COMMENT "Changing linking of keepassxc-cli") diff --git a/src/gui/macutils/AppKitImpl.mm b/src/gui/macutils/AppKitImpl.mm index 9bfbc8de79..fa01285694 100644 --- a/src/gui/macutils/AppKitImpl.mm +++ b/src/gui/macutils/AppKitImpl.mm @@ -144,6 +144,17 @@ - (void) removeGlobalMonitor:(id) monitor // - (bool) enableAccessibility { + // Request a 1 pixel screenshot to trigger the permissions + // required for screen reader access. These are necessary + // for Auto-Type to find the window titles in macOS 10.15+ + CGImageRef screenshot = CGWindowListCreateImage( + CGRectMake(0, 0, 1, 1), + kCGWindowListOptionOnScreenOnly, + kCGNullWindowID, + kCGWindowImageDefault); + CFRelease(screenshot); + + // Request accessibility permissions for Auto-Type type on behalf of the user NSDictionary* opts = @{static_cast(kAXTrustedCheckOptionPrompt): @YES}; return AXIsProcessTrustedWithOptions(static_cast(opts)); }