Skip to content

Commit

Permalink
AXUIElementSetMessagingTimeout set to 1 second
Browse files Browse the repository at this point in the history
#131

It probably won't resolve the problem, but it's a low effort commit that
should make the situation better, avoiding complete freezes
  • Loading branch information
nikitabobko committed Oct 13, 2024
1 parent a8ad835 commit 6bb3f23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/AppBundle/initAppBundle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import AppKit
import Common
import Foundation

let systemWideAx = AXUIElementCreateSystemWide()

public func initAppBundle() {
initTerminationHandler()
isCli = false
Expand All @@ -17,6 +20,7 @@ public func initAppBundle() {
printStderr("--started-at-login is passed but 'started-at-login = false' in the config. Terminating...")
terminateApp()
}
AXUIElementSetMessagingTimeout(systemWideAx, 1.0)

checkAccessibilityPermissions()
startUnixSocketServer()
Expand Down

0 comments on commit 6bb3f23

Please sign in to comment.