I'm trying to get a mac app to open on the current desktop when I use a a global keyboard shortcut (that I've overriden manually in the app). However, when I perform the keyboard shortcut, my desktop switches and shows me the app on the desktop it was previously on instead of the current one. The app is active, but on that other desktop.
Currently, I'm calling:
window?.makeKeyAndOrderFront(nil)
NSApplication.shared.activate(ignoringOtherApps: true)
Thanks in advance for the help.