In my app, there is a utility window (actually it is a NSPanel object). It would show up sometime and be in front of other application's window.
But when other application runs in full-screen mode, the utility window doesn't show. But I found that when full-screen application ran, it would create new desktop.
(I guess the desktop here is the space people talk about in other questions.)
When I checked "Mission Control" in Launchpad, I saw the utility window was displayed in the original desktop, while the full-screen application was in the new desktop that the user currently saw.
I read the document and found some similar questions. It seems like I should set the collection behavior of window. So I tried this:
[self.window setCollectionBehavior:NSWindowCollectionBehaviorDefault | NSWindowCollectionBehaviorTransient | NSWindowCollectionBehaviorFullScreenAuxiliary];
It doesn't work.
How can I move my window to the current desktop / space that the full-screen application created?