mirror of
https://github.com/lwouis/alt-tab-macos.git
synced 2026-05-24 11:20:36 +00:00
fix: alttab would crash after menubar icon was actioned with voiceover
closes #3211
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user