3
votes

I am making an app that has fullscreen support (enabled via interface builder). The app has another NSWindow that appears from time to time as a sort of 'inspector' like in pages and such. However when the primary window goes fullscreen, the secondary one does not accompany it, and I have to go back to my desktop to see it.

Is there a way of fixing this? i.e. when Safari is fullscreen, you can open the activity window and it accompanies safari in fullscreen mode. Thanks a lot!

1

1 Answers

2
votes

If you've actually built an inspector-style panel window (e.g., by dragging a Panel or HUD Window from the Xcode object library into your nib), it will automatically accompany the primary window in fullscreen.

I believe the minimum requirements are that:

  • collectionBehavior includes NSWindowCollectionBehaviorFullScreenAuxiliary
  • collectionBehavior does not include NSWindowCollectionBehaviorFullScreenPrimary
  • either collectionBehavior includes NSWindowCollectionBehaviorTransient or level >= NSFloatingWindowLevel

If you read the documentation on full-screen mode, most of this is explained, although a few details (e.g., when these values are checked…) need to be discovered through trial and error.