Skip to content

Commit

Permalink
Do not disable non-native AX flags on app that loses focus (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
dexterleng authored Mar 18, 2021
1 parent 52740c2 commit c95bc13
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions ViMac-Swift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,7 @@ import Preferences
_ = self.compositeDisposable.insert(
frontmostAppChange.onlyWhen(isAXManualAccessibilityEnabled)
.observeOn(axWorker)
.subscribe(onNext: { (__previousApp, currentApp) in
if let _previousApp = __previousApp {
if let previousApp = _previousApp {
AXManualAccessibilityActivator.deactivate(previousApp)
}
}

.subscribe(onNext: { (_, currentApp) in
if let currentApp = currentApp {
AXManualAccessibilityActivator.activate(currentApp)
}
Expand All @@ -214,13 +208,7 @@ import Preferences
_ = self.compositeDisposable.insert(
frontmostAppChange.onlyWhen(isAXEnhancedUserInterfaceEnabled)
.observeOn(axWorker)
.subscribe(onNext: { (__previousApp, currentApp) in
if let _previousApp = __previousApp {
if let previousApp = _previousApp {
AXEnhancedUserInterfaceActivator.deactivate(previousApp)
}
}

.subscribe(onNext: { (_, currentApp) in
if let currentApp = currentApp {
AXEnhancedUserInterfaceActivator.activate(currentApp)
}
Expand Down

0 comments on commit c95bc13

Please sign in to comment.