# Plugin editor size incorrect?

**URL:** <https://forum.juce.com/t/plugin-editor-size-incorrect/11224>\
**Category:** Linux\
**Created:** [January 30, 2013, 11:03am UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224 "2013-01-30T11:03:08Z")\
**Posts on this page:** 8\
**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 30, 2013, 11:03am UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224/1 "2013-01-30T11:03:08Z")

</div>

Has anyone else experienced the following problems with plugin windows?

[attachment=1]JucePluginWindow.png[/attachment]

It seems that the plugin editor windows size is not correct when the plugin opens. With renoise and other host one just sees an empty, but correctly sized window. With the Juce plugin host demo the editor just opens up with the tiniest of windows:

[attachment=0]JuceSmallPlgin.png[/attachment]

I’m not really sure how to resolve this. It seems completely erratic, perhaps 1 in 10 times I open the editor it will appear like this? The JUCE source I’m using is from 6 days ago.

---

<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 30, 2013, 1:51pm UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224/2 "2013-01-30T13:51:46Z")

</div>

Have you made sure your editor component’s size is set correctly in its constructor?

---

<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 30, 2013, 3:20pm UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224/3 "2013-01-30T15:20:18Z")

</div>

I’m using the JuceDemoPlugin, so em, I assume you have 🙂 In my own plugins I call setSize(400, 300) in the editor constructor. I’m happy to keep digging, but I need some direction…

---

<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:** [May 14, 2014, 4:56pm UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224/4 "2014-05-14T16:56:26Z")

</div>

This issue still persists with the latest version of JUCE but seems to be local to the plugin demo host now. Launching the editor of the demo plugin in the demo host causes it to appear in a minimised fashion but it's completely erratic. 1 out of 10 times it might open fine, but the rest of the time it looks like this:

&nbsp;

![](http://www.juce.com/sites/default/files/forum/attachments/Screenshot%20-%20140514%20-%2017%3A47%3A39.png)

I would like to use the demo plugin host for testing, but it's kind of unusable if one can't access the plugin's editor. Any ideas?

---

<div class="post-metadata">

**Author:** ![Drumfix](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@Drumfix](https://forum.juce.com/u/Drumfix)\
**Post date:** [May 30, 2014, 8:23am UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224/5 "2014-05-30T08:23:14Z")

</div>

The bug is in the effEditOpen part of Juce\_VST\_Wrapper.cpp

&nbsp;

change

```
              #elif JUCE_LINUX

                editorComp->addToDesktop (0);

                hostWindow = (Window) ptr;

                Window editorWnd = (Window) editorComp->getWindowHandle();

                XReparentWindow (display, editorWnd, hostWindow, 0, 0);

              #else
```

to

```
              #elif JUCE_LINUX

                editorComp->addToDesktop (0, ptr);

                hostWindow = (Window) ptr;

              #else
```

@ Jules: Please test this patch and, if incorporated into Juce, inform all Linux VST Plugin vendors using Juce to provide an Update.

---

<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:** [May 30, 2014, 8:36am UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224/6 "2014-05-30T08:36:31Z")

</div>

Disclaimer: I don't have a system to test linux VSTs myself, so rely on the community to test this kind of thing.

But if anyone else can confirm that this works, I'd be happy to add it, as it looks sensible to me!

---

<div class="post-metadata">

**Author:** ![Drumfix](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@Drumfix](https://forum.juce.com/u/Drumfix)\
**Post date:** [May 30, 2014, 10:35am UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224/7 "2014-05-30T10:35:44Z")

</div>

Note: this patch is to make plugins built with the JUCE framework open/resize correctly in VST hosts that have not been built

using the JUCE framework.

&nbsp;

It does not address any of the fundamental loading/resizing faults of the audio plugin host example.

---

<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 10, 2015, 9:35am UTC](https://forum.juce.com/t/plugin-editor-size-incorrect/11224/8 "2015-01-10T09:35:20Z")

</div>

Sorry to bring up this old chestnut again, but I just checked out the very latest tip and this is still an issue. The Juce audio plugin demo does not load with the correct size in the Juce plugin host demo.&nbsp; I'm happy to go digging if I can get some direction?
