Bug: DocumentWindow add 22 to height when going fullscreen?

In Projucer I created a simple GUI application. The main window is a DocumentWindow and it defaults to not resizable. The contained MainComponent is set to 600x400.

When I run it and hit the green full screen button (on OS X), the window fills the screen properly, but the MainComponent is now 600x422 and stays that size when brought back from fullscreen. If I click on the fullscreen icon again, it adds another 22 to the height and becomes 600x444.

If I setResizable(true, true) to the MainWindow, when I hit full screen, the MainComponent grows to full screen size as expected and goes back to it’s proper 600x400 size when going back.

So, why does the inner content of DocumentWindow grow by 22 in height when going fullscreen?

This bug appears in OS X, haven’t tested Windows yet.

One more thing: This bug appears only when using a setUsingNativeTitlebar(true), but interestingly, it’s not the same look of fullscreen…it doesn’t appear to be a proper OS X fullscreen.

Confirmed - i can replicate this with fixed size DocumentWindow on El Capitan - making window resizable seems to fix it, but it is not acceptable solution for me.

Strangely enough, this issue is not present on Mavericks, where green button does classic window maximizing, not full screen mode.

I suspect 22 is height of the title bar.

I do have the same issue! Also if you could have a look at this related topic: Window size contraints not taken into account in macOS Split View

Related topic: Mac OS: full screen mode issue