Skip to content

Commit

Permalink
fix: alttab would crash after menubar icon was actioned with voiceover
Browse files Browse the repository at this point in the history
closes #3211
  • Loading branch information
lwouis committed Mar 3, 2024
1 parent b8833b7 commit f7fdf3f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ui/Menubar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ class Menubar {
}

@objc func statusItemOnClick() {
if NSApp.currentEvent!.type == .leftMouseDown {
statusItem.popUpMenu(App.app.menubar.menu)
} else {
// NSApp.currentEvent == nil if the icon is "clicked" through VoiceOver
if let type = NSApp.currentEvent?.type, type != .leftMouseDown {
App.app.showUi()
} else {
statusItem.popUpMenu(App.app.menubar.menu)
}
}

Expand Down

0 comments on commit f7fdf3f

Please sign in to comment.