Linux X11 windowing in a VST 3.6.7 plugin using JUCE components

SDK for VST 3 audio plug-in and host development.
Post Reply
bardetad
Posts: 5
Joined: Tue Mar 07, 2017 3:39 pm

Linux X11 windowing in a VST 3.6.7 plugin using JUCE components

Post by bardetad »

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

Code: Select all

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

Code: Select all

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

Code: Select all

bool X11Window::Impl::handlePlugEvent (const XEvent& event)
at line 766 of editorhost window.cpp :

Code: Select all

xembedInfo = getXEmbedInfo ();
.
On console, I get the error "XGetWindowProperty for XEMBEDINFO 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 ?

Thanks !
Adrien

Arne Scheffler
Posts: 383
Joined: Mon Jun 20, 2016 7:53 am

Re: Linux X11 windowing in a VST 3.6.7 plugin using JUCE components

Post by Arne Scheffler »

On Linux you need to embed a X11 window which supports the XEMBED protocol. I don't think that Juce supports this yet.

bardetad
Posts: 5
Joined: Tue Mar 07, 2017 3:39 pm

Re: Linux X11 windowing in a VST 3.6.7 plugin using JUCE components

Post by bardetad »

Hi,
Thanks for the response. Yes I got confirmation from Juce. They are working on the VST3 support for Linux where they will add XEmbed support.
Cheers,
Adrien

Post Reply