I'm building a status bar application that opens an NSWindow beneath it's status item when clicked, similar to the Dropbox app:
However, when I test it within a fullscreen app (such as Mail), the screen switches back to my main desktop screen and shows the window there, rather than overlaying the window over the fullscreen app, as dropbox does:
Is it possible to show an NSWindow dropdown from an NSStatusItem while in fullscreen mode of another app? I've seen other projects, like Vadim Shpakovski's Popup, but I'd really like the content to be in an actual NSWindow.
As an aside, I've also tried this with NSPopover rather than NSWindow, but that also had issues with fullscreen mode, as I mentioned in another question I posted.
EDIT:
Using Ken's answer, I managed to get it to work with:
window.collectionBehavior =
NSWindowCollectionBehavior.MoveToActiveSpace | NSWindowCollectionBehavior.FullScreenAuxiliary