Fix X11 embedding on Qt4
This commit is contained in:
@@ -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 @@ public:
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user