Skip to content

Commit

Permalink
fix: switcher would not close, or cycle on its own (closes #3117)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Nov 8, 2024
1 parent c0f0ce7 commit d430f83
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/logic/ATShortcut.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class ATShortcut {
func shouldTrigger() -> Bool {
if scope == .global {
if triggerPhase == .down && (!App.app.appIsBeingUsed || index == nil || index == App.app.shortcutIndex) {
App.app.appIsBeingUsed = true
return true
}
if triggerPhase == .up && App.app.appIsBeingUsed && (index == nil || index == App.app.shortcutIndex) && Preferences.shortcutStyle[App.app.shortcutIndex] == .focusOnRelease {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ class App: AppCenterApplication, NSApplicationDelegate {
}

@objc func showUi() {
appIsBeingUsed = true
showUiOrCycleSelection(0)
}

Expand Down Expand Up @@ -271,6 +270,7 @@ class App: AppCenterApplication, NSApplicationDelegate {

func showUiOrCycleSelection(_ shortcutIndex: Int) {
logger.i("showUiOrCycleSelection")
App.app.appIsBeingUsed = true
if isFirstSummon || shortcutIndex != self.shortcutIndex {
logger.i("showUiOrCycleSelection: isFirstSummon")
isFirstSummon = false
Expand Down

0 comments on commit d430f83

Please sign in to comment.