I've got a dilemma so I need your help to choose between the two solutions I've found so far about how implement fullscreen for non-desktop video mode. (
A 'desktop-mode' window in fullscreen produces no issue.)
The first solution is to «capture» the screen (which allow only one app to use it, the user cannot switch to another app). The only way to use another app is to close the window which will «release» the screen.
To use this technique and have the window displayed I must set its level to CGShieldingWindowLevel, which is not recommended. [2]
I didn't see any issue with this and I think it's because I don't use fullscreen context strictly speaking (I use one big window that has the size of the screen [1] ). So this should work.
But as said before, it doesn't allow the user to switch to another application – which is very bad, I think.
The second solution doesn't use display capture thus the user can use cmd+tab to switch to his mail app for example. But it has also a bad behaviour : when an app change the screen size without capturing the display some other app's windows may be resized (Finder, Mail, iTunes, .... almost every app in fact). Which is very bad for user experience (who wants to use an app that resize every window or rearrange your desktop files ? ).
Until now I haven't found a way to prevent windows to resize when changing screen size. (Maybe someone else knows ?)
So I ask you, which one should I use ?
A) no window resized but cannot switch from app.
B) can switch to another app but the windows might be resized.–––––––––––––––––––
Further reading – not required to follow the discussion :
[1] the doc says
here (at the bottom) the following about fullscreen window vs fullscreen context :
Note: It’s not necessary to capture a display to do full-screen drawing. Another approach is to create and draw into a borderless window the size of the display. This approach allows you to use all the features of the windowing system. It also plays well with the rest of the operating system, and it reduces the complexity of display handling (for example, you don’t have to worry about mirrored displays). With this approach, you can receive error alerts that might be missed with a captured display. You can also use Command-Tab to change applications with this approach. On systems with modern graphics hardware, drawing performance in a full-screen window is almost as fast as a full-screen drawing context
[2]
here This function returns a value that is sometimes used to position a window over the shield window for a captured display. Attempting to position a window over a captured display may be unsuccessful—or it may present undesirable results such as illegible or invisible content—because of interactions between full-screen graphics (such as OpenGL full-screen drawing contexts) and the graphics hardware. Because of these limitations, this technique is not recommended.
PS : two days on it – I'm getting crazy ...
EDIT : typo