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?
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: