Maximise plugin editor window

gui
#1

I have a requirement to be able to maximise a plugin window. Obviously this needs to be done from outside the window bar in most cases I am aware of.

I can set the size to more or less the maximum with e.g.

auto bounds = Desktop::getInstance()
                .getDisplays()
                .findDisplayForPoint (this->getBounds().getCentre())
                .userArea;
setSize (bounds.getWidth(), bounds.getHeight()-20); // -20 otherwise window is too high on MacOS

Is there a way to ask the host to position the window at the top left?
And is there a way to get an accurate(ish) height for the OS window decoration in order to calculate the height needed to fill the user screen without going over?

2 Likes