I’m making a VST3 plugin on Linux with the new release 3.6.7. I’m trying to make it work with the Steinberg “editorHost”.
For the GUI I’d like to use JUCE components instead of Steinberg’s VSTGUI. So I’ve defined a class “JUCEView” which inherits both from Steinberg’s EditorView and JUCE’s Component classes. To enable JUCE component attachment, I’ve overridden methods, especially the “attached” one :
> virtual Steinberg::tresult PLUGIN_API attached(void* parent, Steinberg::FIDString type) override;
In this method, after a setOpaque(true) and a setVisible(true) I call the JUCE Component’s “addToDesktop” :
> virtual void addToDesktop (int windowStyleFlags, void* nativeWindowToAttachTo = nullptr);
in order to create a new window which will be attached to the window host of the editorHost.
For windowing, JUCE opens a X11 connection (via a Display* structure) and configures it during the addToDesktop. The editorHost opens a connection too.
After initialization, there is an event loop of the editorHost. The plugin window is supposed to display on the host one.
However the loop crashes when the host tries to get properties from the plugin window in
bool X11Window::Impl::handlePlugEvent (const XEvent& event) at line 766 of editorhost window.cpp :
xembedInfo = getXEmbedInfo ();.
On console, I get the error "XGetWindowProperty for _XEMBED_INFO failed"
I guess the problem is that editorHost and the JUCE component target the same plugin Window but they don’t have the same Display connection. So the editorHost can’t access the window properties set in the addToDesktop of JUCE.
Is there a way (e.g. X11 function) to get this 2 connections working together ? Or to bring out the events from the JUCE display structure to the editorhost without disturbing the code of those ?