JuceDemoPlugin drawing problem in Sibelius

I’ve been trying to fix a drawing problem of my plugin in Sibelius on Mac for a while so I decided to start from scratch.
I turned the JuceDemoPlugin into an instrument and loaded it in Sibelius 6.1.0 and I have the same behaviour

The first display of the JuceDemoPlugin is correct (see attachment)
When I hide it and show it again, the window is blank (see attachment). Actually, the content of the plugin appears very briefly and then is erased. In this example I could also resize the juce plugin window that exceeds the Sibelius plugin container window.
Sometimes the plugin window is displayed when not asked for (see attachment).
I can also have the juce plugin window after hiding the Sibelius application.

It looks as though the Sibelius plugin container window and Juce window where not connected together but I don’t know how to fix it.

I use the 28/02/11 tip.

They are indeed not “connected”, as juce puts an NSWindow on top of Carbon window for 32bit AU/VST/RTAS :wink:
For some hosts this seem to work fine (Logic), but in some of them it doesn’t work perfectly (like Sibelius, I can also confirm the same happening with Digital Performer 7). I’m not sure how to fix this too, so if anyone has any idea (Jules?), I’m all ears :wink:

cheers,
Bart :wink:

The best method I’ve ever come up with is to spend hours and hours swearing and trying different desperate hacks until something seems to work, only to then find that your change has broken compatibility with some other host that was working correctly before… sigh.