Add X11EmbedContainer Qt5 port
This commit is contained in:
@@ -28,6 +28,7 @@ SET(REMOTE_VST_PLUGIN_FILEPATH "RemoteVstPlugin" CACHE STRING "Relative file pat
|
||||
|
||||
ADD_DEFINITIONS(-DREMOTE_VST_PLUGIN_FILEPATH="${REMOTE_VST_PLUGIN_FILEPATH}")
|
||||
BUILD_PLUGIN(vstbase vst_base.cpp VstPlugin.cpp VstPlugin.h communication.h MOCFILES VstPlugin.h)
|
||||
TARGET_LINK_LIBRARIES(vstbase x11embedcontainer)
|
||||
|
||||
IF(LMMS_BUILD_LINUX AND NOT WANT_VST_NOWINE)
|
||||
|
||||
|
||||
@@ -32,10 +32,7 @@
|
||||
#include <QMdiArea>
|
||||
#include <QMdiSubWindow>
|
||||
#ifdef LMMS_BUILD_LINUX
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QX11EmbedContainer>
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
#include "X11EmbedContainer.h"
|
||||
#else
|
||||
#include <QLayout>
|
||||
#endif
|
||||
@@ -244,25 +241,21 @@ void VstPlugin::showEditor( QWidget * _parent, bool isEffect )
|
||||
sw->setAttribute( Qt::WA_TranslucentBackground );
|
||||
sw->setWindowFlags( Qt::FramelessWindowHint );
|
||||
sw->setWidget( m_pluginWidget );
|
||||
#if QT_VERSION < 0x050000
|
||||
QX11EmbedContainer * xe = new QX11EmbedContainer( sw );
|
||||
xe->embedClient( m_pluginWindowID );
|
||||
xe->setFixedSize( m_pluginGeometry );
|
||||
xe->show();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
sw->setWindowFlags( Qt::WindowCloseButtonHint );
|
||||
sw->setWidget( m_pluginWidget );
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
QX11EmbedContainer * xe = new QX11EmbedContainer( sw );
|
||||
xe->embedClient( m_pluginWindowID );
|
||||
xe->setFixedSize( m_pluginGeometry );
|
||||
xe->move( 4, 24 );
|
||||
xe->show();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ private:
|
||||
|
||||
QString m_plugin;
|
||||
QPointer<QWidget> m_pluginWidget;
|
||||
int m_pluginWindowID;
|
||||
WId m_pluginWindowID;
|
||||
QSize m_pluginGeometry;
|
||||
|
||||
bool m_badDllFormat;
|
||||
|
||||
Reference in New Issue
Block a user