Top-left coordinates of plugin window

I need the screen position of a 3rd party audio plugin window under OSX. I do not have access to the inner workings of the plugin, only a pointer to its AudioProcessorEditor. I thought editor->getPeer()->localToGlobal(P(0,0)) should give me the top left position of its parent window in screen coordinates, but it gives me the top left position of the plugin UI (which can be at any arbitrary position in its native window depending on the host; Logic adds some space on the top and the bottom, Reaper only on the top etc). Is that how it is supposed to be?