Save and restore topmost window position --- how?

I've got a DocumentWindow whose absolute position I want to save on exiting the app, and restore when restarting the app.  Unfortunately, the restored window is always a bit lower on the screen than it was on exit, it seems to be the width of the titlebar.

My code does a "getScreenX()" etc on exit, and a setTopLeftPosition() on restore.  

I tried to adjust for the width of the title bar, but because I'm using the 'native' title bar, the value JUCE gives me for the height of the bar is zero.

How is this meant to work?

ResizableWindow::getWindowStateAsString and restoreWindowStateFromString?

Missed that!  Yes, it does work, thanks.

Well, it does work ... on OS X ... but not on Linux

It's not platform dependent, it just sets the window bounds. What's not working?

On Linux, the window is placed a title-bar's width lower on the screen.

I'm running Mint 14 with the Cinnamon desktop, if that makes a difference.  

On OS X it's ok.  On Windows it's ok.