X11EmbedContainer: Fix XEMBED protocol implementation

This commit is contained in:
Lukas W
2017-04-08 17:11:56 +02:00
parent e661d26f42
commit adef05fb71
7 changed files with 153 additions and 254 deletions

View File

@@ -556,6 +556,11 @@ bool RemoteVstPlugin::processMessage( const message & _m )
break;
}
case IdShowUI:
ShowWindow( m_window, SW_SHOWNORMAL );
UpdateWindow( m_window );
break;
default:
return RemotePluginClient::processMessage( _m );
}
@@ -687,9 +692,6 @@ void RemoteVstPlugin::initEditor()
SWP_NOMOVE | SWP_NOZORDER );
pluginDispatch( effEditTop );
ShowWindow( m_window, SW_SHOWNORMAL );
UpdateWindow( m_window );
#ifdef LMMS_BUILD_LINUX
m_windowID = (intptr_t) GetProp( m_window, "__wine_x11_whole_window" );
#endif

View File

@@ -229,35 +229,31 @@ void VstPlugin::showEditor( QWidget * _parent, bool isEffect )
return;
}
m_pluginWidget = new QWidget( _parent );
QX11EmbedContainer * xe = new QX11EmbedContainer;
m_pluginWidget = xe;
m_pluginWidget->setFixedSize( m_pluginGeometry );
m_pluginWidget->setWindowTitle( name() );
connect(xe, SIGNAL(clientIsEmbedded()), this, SLOT(showUI()));
if( _parent == NULL )
{
vstSubWin * sw = new vstSubWin(
gui->mainWindow()->workspace() );
sw->setWidget( m_pluginWidget );
if( isEffect )
{
sw->setAttribute( Qt::WA_TranslucentBackground );
sw->setWindowFlags( Qt::FramelessWindowHint );
sw->setWidget( m_pluginWidget );
QX11EmbedContainer * xe = new QX11EmbedContainer( sw );
xe->embedClient( m_pluginWindowID );
xe->setFixedSize( m_pluginGeometry );
xe->show();
}
}
else
{
sw->setWindowFlags( Qt::WindowCloseButtonHint );
sw->setWidget( m_pluginWidget );
QX11EmbedContainer * xe = new QX11EmbedContainer( sw );
xe->embedClient( m_pluginWindowID );
xe->setFixedSize( m_pluginGeometry );
xe->move( 4, 24 );
xe->show();
}
}
xe->embedClient( m_pluginWindowID );
xe->setFixedSize( m_pluginGeometry );
#endif