[LV2] Qt5 plugin UIs and libsuil

Stefan Westerfeld stefan at space.twc.de
Mon Feb 27 04:55:14 PST 2017


On Sun, Feb 26, 2017 at 12:34:18PM +0100, David Robillard wrote:
> On Thu, 2017-02-23 at 13:57 +0100, Filipe Coelho wrote:
> > On 23.02.2017 13:35, Stefan Westerfeld wrote:
> > >     Hi!
> > > 
> > > My SpectMorph LV2 plugin uses Qt5 for its UI. Ardour (and maybe
> > > other hosts)
> > > uses libsuil, but since libsuil doesn't support embedding Qt5
> > > widgets, the
> > > plugin UI won't work. This is not only the case for SpectMorph,
> > > other Qt based
> > > plugins like synthv1 can also be compiled against Qt5.
> > 
> > Hello there.
> > Just a few days ago I took my chances on this too.
> > See 
> > https://github.com/falkTX/suil/commit/6123337a316d95b9fe70037c738e084
> > 0fb707ccb
> I have added a cleaned up version of these to master, but it crashes
> (as do both original versions) for me with jalv.gtk almost every time. 
> Gtkmm hosts like Ardour usually, but not always, avoid this problem.
> http://git.drobilla.net/cgit.cgi/suil.git/commit/?id=176e3c9146d01d35b8
> 71b7a00e3c8c2482b008ec

Ok, so you merged the falkTX Qt5 embedding implementation (not mine). Now that
it is in upstream libsuil I rebuilt Ardour5 with that suil. For synthv1
everything indeed works as expected. For the SpectMorph UI, it somewhat works.

However there is the annoying problem that if you open the SpectMorph UI in
Arodur, resize it to a larger window size, close it and reopen it, the
SpectMorph UI widget will not cover the entire UI space Ardour provides, but a
smaller subarea. It also looks strange because you can partially see the
original ardour widgets through the embedding. So the UI is effectively
somewhat broken. Since everything worked fine when I still was using my
implementation, I think it would be better if you just merged my version.

I also believe that falkTK himself said that his approach would be somewhat
of a hack. It for instance uses raw Xlib functions like XMoveWindow. My
implementation on the other hand tells the Qt5 toolkit to do the embedding
basically like this:

  wrap->qembed->windowHandle()->setParent (QWindow::fromWinId (gtk_socket_get_id (s)));

which is why I believe it handles all cases properly, because Qt5 is doing
the actual embedding, whereas the falkTX implementation is broken at least
in one case (triggered by SpectMorph).

So after having tested both, I strongly recommend merging my code.

   Cu... Stefan
Stefan Westerfeld, http://space.twc.de/~stefan

More information about the Devel mailing list