I've found a strange behaviour when internally resizing VST plugin in Reaper x64 OSX. I am able to replicate it in JuceDemoPlugin as well with a few additional lines of code. Note, that with Reaper on Windows everything works as expected.
- when loaded, plugin is opened and correctly resized for the first time
- if i close and reopen editor, plugin GUI is initially displayed at the correct position BUT ...
- when resize is triggered, plugin completely looses its position - it is misplaced somewhere in the middle of the Reaper FX window and only a part of it is displayed ...
- resizing Reaper FX window with a mouse reveals complete plugin, but retains misplaced position ...
I am not sure if this is Reaper's or JUCE's problem ... if plugin is opened in floating window, everything works correctly, so this one really looks like it is on Reaper's side. I've tried to load it in Nuendo 6.5 and NebulaMan (both use floating windows for plugins) and they both work ok.
Any ideas or suggestions would be greatly appreciated !!! Did anyone experience this kind of behaviour ?
Thx!
EDIT:
Resizing of AU version of the plugin works as expected, both in Reaper and Logic X.
The first highly problematic thing is setNativeHostWindowSizeVST():
Code:
if (NSView* hostView = (NSView*) window) {
That should check to see if hostView is the contentView, and if not, behave much differently!
Granted, I know that almost every other VST host will pass an NSView that is a contentView, so it's our fault, but we made that decision years ago and are stuck with it... :/
There is definitely some handling I can improve in REAPER now, that is causing some of these issues. Maybe it won't require changing JUCE after all... stay tuned.
Thanks, Jules ... i'll keep you informed about Justin's progress. If he won't be able to do it, then any improvement regarding this issue on JUCE's side will be very welcome.
Hey, I just wanted to revive this thread as we’re experiencing resizing issues on the latest version of Reaper (5.24+). These only happen on VST3. Audio Units and VST2 plugins seem to be working without issue. Basically, whenever we resize our VST3 plugin the top position gets offset inside of the reaper plugin window. Below is a gif demonstrating the bug. I’ve tried tracing to figure out the problem and it seems that every time we resize there are two calls made to “onSize()” inside of juce_VST3_Wrapper.cpp.
Interestingly, if I put a breakpoint inside of that function I can see that after the first call the plugin is correctly placed but then it’s moved to an incorrect location after the second call. It’s as if JUCE and Reaper are fighting each other regarding the top left position. You can also see this in the gif on certain frames, where the plugin goes to the correct location but then is offset a split second later.
I’ve tried putting calls to setTopLeftPosition(0,0) on the plugin inside of a timer as a hacky workaround but that had no effect. Please let me know if you have any ideas what could be causing this and what we could try to solve it (even hackily). Thanks.