Skip to content

Commit

Permalink
Fix X11 embedding on Qt4
Browse files Browse the repository at this point in the history
  • Loading branch information
DomClark authored and PhysSong committed May 30, 2018
1 parent 1220374 commit 55da698
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/VstEffect/VstEffectControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
4 changes: 3 additions & 1 deletion plugins/vestige/vestige.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}

Expand Down
6 changes: 4 additions & 2 deletions plugins/vst_base/VstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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)
Expand Down

0 comments on commit 55da698

Please sign in to comment.