Strange goings on with latest tip

- The JucePluginDemo but doesn't behave correctly when opened in JUCE-based,or non-Juce based hosts. It appears that as soon as one presses a key on the keyboard component the plugin loses focus and the note stops. Reverting this commit fixes the issue:

- While the aforementioned commit did help to ensure JUCE based plugins open with the correct size on non-JUCE based hosts, the issue of JUCE plugins not opening correctly in JUCE-based hosts remains. When the host calls createEditorIfNeeded() with a JUCE based plugin it is more often than not returning an editor with height and size of 1.

Any ideas on how to fix this?

btw, I could recreate the issues fallTx is having with popup displays..

Not having a linux plugin dev environment, I'm afraid I mostly rely of you guys for suggestions on this one - ideas welcome!

While this is the result of pure guess work, the following change to the vst wrapper(line 1185-ish) seems to fix all of the problems reported above. Plugins now consistently open with the correct size in juce-based hosts (host plugin demo) and non juce-based hosts(renoise, bitwig). Popup displays appear where they should and plugins don't lose focus and can be played through the editor without any issues.

              #elif JUCE_LINUX
                editorComp->addToDesktop (0, ptr);
                hostWindow = (Window) ptr;
                Window editorWnd = (Window) editorComp->getWindowHandle();
                XReparentWindow (display, editorWnd, hostWindow, 0, 0);

Now if anyone could explain why this fixes everything I'm all ears.

Well, I'm happy to make that change if others can confirm it, though I also can't see why it would make any difference!

Hi there,
I confirm that this does indeed fixes the window positionning issue.
Rory, you just saved me from more days of debugging, thanks!

That was a long time ago. I haven’t noticed the same problems with version 4.