Skip to content

Commit

Permalink
fix: remove accessibility prompt 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
kentbetita committed Feb 22, 2024
1 parent 97aca0a commit 3499142
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Sources/ActiveWinCLI/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ func getWindowInformation(window: [String: Any], windowOwnerPID: pid_t) -> [Stri
let disableScreenRecordingPermission = CommandLine.arguments.contains("--no-screen-recording-permission")
let enableOpenWindowsList = CommandLine.arguments.contains("--open-windows-list")

// Show accessibility permission prompt if needed. Required to get the complete window title.
if !AXIsProcessTrustedWithOptions(["AXTrustedCheckOptionPrompt": true] as CFDictionary) {
print("active-win requires the accessibility permission in “System Settings › Privacy & Security › Accessibility”.")
exit(1)
}

// Show screen recording permission prompt if needed. Required to get the complete window title.
if !disableScreenRecordingPermission && !hasScreenRecordingPermission() {
print("active-win requires the screen recording permission in “System Settings › Privacy & Security › Screen Recording”.")
Expand Down

0 comments on commit 3499142

Please sign in to comment.