Show NSWindow under NSStatusItem in full screen mode
I am creating a status bar application that opens an NSWindow under its status on click, similar to the Dropbox application:
However, when I test it in a full screen app (like Mail), the screen switches back to the main desktop screen and shows the window there, rather than overlaying the window on the full screen app, as dropbox does:
Is it possible to show the NSWindow dropdown menu from an NSStatusItem while in full screen mode of another application? I've seen other projects like Vadim Shpakovski Popup , but I'd really like the content to be in a real NSWindow.
As an aside, I also tried this with NSPopover and not NSWindow, but this also had problems with fullscreen mode as I mentioned in another question I posted .
EDIT:
Using Ken's answer, I was able to get it to work with:
window.collectionBehavior =
NSWindowCollectionBehavior.MoveToActiveSpace | NSWindowCollectionBehavior.FullScreenAuxiliary
source to share