On Mac it works correctly. Basically, I want to have my document window open with the title bar already visible no matter what size of the window is. It looks like getLocalBounds() called on DocumentWindow sometimes includes area of the title bar, so the whole window area is repainted / covered by a content component. Or maybe I am missing something?
Thanks, yes, I played with these settings, but it even if I remove my content component and create an empty window with size = userArea, then the title bar is not shown.
But if I write documentWindow->setBounds (Desktop::getInstance().getDisplays().getPrimaryDisplay()->userArea.withTrimmedTop (1));
then the title bar is visible. Trimming width, height etc. does not help too, so the conclusion is that the title bar is not drawn (or rather is painted over with a background colour / content component) always when the document window position is (0, 0).
Edit. I think the above statements are not exactly right. When I run this simple code: