Wrong UI positioning in OS X host


Hi all,

I'm currently writing a VST host. Everything is working fine so far, except for a strange issue on OS X (10.8.2): any plugin's GUI suffers from a vertical misalignment as you can see in the picture below:



A way to fix that is to call setContentSize on the NSWindow and set the proper dimension BEFORE the plugin editor becomes visible (pseudo-code): 

juce::AudioProcessorEditor *ui = <...grab pointer to AudioProcessorEditor...>
int editorW = ui->getWidth();
int editorH = ui->getHeight();
NSWindow *w = <...grab pointer to parent window...>;
[w setContentSize:NSMakeSize(editorW, editorH)];
[w update];

My experience with OS X and Objective-C++ is quite limited, so I'm sure there will be better solutions.


I have to make an apology with you Juce guys: I was happily making pull requests on GitHub until I found that message on the wiki:

Please DO NOT SEND ANY PULL REQUESTS via github!! I do NOT merge any 3rd-party changes directly into the repository without editing/testing them first, so will NOT accept pull requests!

Sorry for that!  



(I might tone-down the anti-pull-request thing, actually. Although we don't accept them, it can be quite a handy way for people to show us suggested changes..)

So you're saying this only happens on 10.8? Odd that if this happens with all plugins, then we've not heard it before.. Are you talking about VST2, VST3 or AUs? And where exactly are you suggesting that we add this extra window resize?