Permalink
Browse files

Fix X11 embedding on Qt4

  • Loading branch information...
DomClark authored and PhysSong committed Mar 24, 2018
1 parent 1220374 commit 55da698d7c864397c695583ff9da8c1a76718e8f
Showing with 8 additions and 4 deletions.
  1. +1 −1 plugins/VstEffect/VstEffectControlDialog.cpp
  2. +3 −1 plugins/vestige/vestige.cpp
  3. +4 −2 plugins/vst_base/VstPlugin.cpp
@@ -64,7 +64,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
if (embed_vst) {
if (! m_plugin->pluginWidget()) {
m_plugin->createUI(nullptr);
m_plugin->createUI(this);
}
m_pluginWidget = m_plugin->pluginWidget();
}
@@ -107,10 +107,12 @@ class VstInstrumentPlugin : public VstPlugin
void createUI( QWidget *parent ) override
{
Q_UNUSED(parent);
VstPlugin::createUI( nullptr );
if ( embedMethod() != "none" ) {
m_pluginSubWindow.reset(new vstSubWin( gui->mainWindow()->workspace() ));
VstPlugin::createUI( m_pluginSubWindow.get() );
m_pluginSubWindow->setWidget(pluginWidget());
} else {
VstPlugin::createUI( nullptr );
}
}
@@ -656,6 +656,10 @@ void VstPlugin::createUI( QWidget * parent )
#ifdef LMMS_BUILD_LINUX
if (m_embedMethod == "xembed" )
{
if (parent)
{
parent->setAttribute(Qt::WA_NativeWindow);
}
QX11EmbedContainer * embedContainer = new QX11EmbedContainer( parent );
connect(embedContainer, SIGNAL(clientIsEmbedded()), this, SLOT(handleClientEmbed()));
embedContainer->embedClient( m_pluginWindowID );
@@ -671,8 +675,6 @@ void VstPlugin::createUI( QWidget * parent )
container->setWindowTitle( name() );
m_pluginWidget = container;
container->setFixedSize( m_pluginGeometry );
}
bool VstPlugin::eventFilter(QObject *obj, QEvent *event)

0 comments on commit 55da698

Please sign in to comment.