# Strange goings on with latest tip

**URL:** <https://forum.juce.com/t/strange-goings-on-with-latest-tip/14156>\
**Category:** Linux\
**Created:** [January 11, 2015, 10:14am UTC](https://forum.juce.com/t/strange-goings-on-with-latest-tip/14156 "2015-01-11T10:14:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rory](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rory/32/534_2.png) [@rory](https://forum.juce.com/u/rory)\
**Post date:** [January 11, 2015, 10:14am UTC](https://forum.juce.com/t/strange-goings-on-with-latest-tip/14156/1 "2015-01-11T10:14:38Z")

</div>

- 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:

https://github.com/julianstorer/JUCE/commit/e0f64bb27ac5e33ee1b2a61787c08e8c7a7c9e42

- 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..

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [January 11, 2015, 11:58am UTC](https://forum.juce.com/t/strange-goings-on-with-latest-tip/14156/2 "2015-01-11T11:58:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rory](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rory/32/534_2.png) [@rory](https://forum.juce.com/u/rory)\
**Post date:** [January 11, 2015, 3:41pm UTC](https://forum.juce.com/t/strange-goings-on-with-latest-tip/14156/3 "2015-01-11T15:41:01Z")

</div>

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);
              #else
```

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

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [January 11, 2015, 4:27pm UTC](https://forum.juce.com/t/strange-goings-on-with-latest-tip/14156/4 "2015-01-11T16:27:04Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Ace17](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Ace17](https://forum.juce.com/u/Ace17)\
**Post date:** [June 8, 2016, 7:49pm UTC](https://forum.juce.com/t/strange-goings-on-with-latest-tip/14156/5 "2016-06-08T19:49:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rory](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rory/32/534_2.png) [@rory](https://forum.juce.com/u/rory)\
**Post date:** [June 8, 2016, 8:29pm UTC](https://forum.juce.com/t/strange-goings-on-with-latest-tip/14156/6 "2016-06-08T20:29:08Z")

</div>

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