Browse Source

More parenting work, handle it in internal distrho plugins

tags/1.9.4
falkTX 11 years ago
parent
commit
2fab968b92
10 changed files with 36 additions and 5 deletions
  1. +3
    -0
      source/backend/plugin/NativePlugin.cpp
  2. +2
    -0
      source/modules/dgl/Window.hpp
  3. +18
    -0
      source/modules/dgl/src/Window.cpp
  4. +3
    -0
      source/modules/distrho/src/DistrhoPluginCarla.cpp
  5. +5
    -0
      source/modules/distrho/src/DistrhoUIInternal.hpp
  6. +1
    -1
      source/modules/native-plugins/distrho-3bandeq.cpp
  7. +1
    -1
      source/modules/native-plugins/distrho-3bandsplitter.cpp
  8. +1
    -1
      source/modules/native-plugins/distrho-nekobi.cpp
  9. +1
    -1
      source/modules/native-plugins/distrho-pingpongpan.cpp
  10. +1
    -1
      source/modules/native-plugins/distrho-stereoenhancer.cpp

+ 3
- 0
source/backend/plugin/NativePlugin.cpp View File

@@ -687,7 +687,10 @@ public:
fIsUiVisible = yesNo;

if (! yesNo)
{
pData->transientTryCounter = 0;
return;
}

if ((fDescriptor->hints & ::PLUGIN_USES_PARENT_ID) == 0)
pData->tryTransient();


+ 2
- 0
source/modules/dgl/Window.hpp View File

@@ -61,6 +61,8 @@ public:

void setTitle(const char* title);

void setTransientWinId(intptr_t winId);

App& getApp() const noexcept;
uint32_t getEventTimestamp() const;
int getModifiers() const;


+ 18
- 0
source/modules/dgl/src/Window.cpp View File

@@ -459,6 +459,19 @@ public:
#endif
}

void setTransientWinId(const intptr_t winId)
{
#if defined(DGL_OS_LINUX)
XSetTransientForHint(xDisplay, xWindow, static_cast<::Window>(winId));
#else
return;
// unused
(void)winId;
#endif
}

// -------------------------------------------------------------------

App& getApp() const noexcept
{
return fApp;
@@ -873,6 +886,11 @@ void Window::setTitle(const char* title)
pData->setTitle(title);
}

void Window::setTransientWinId(intptr_t winId)
{
pData->setTransientWinId(winId);
}

App& Window::getApp() const noexcept
{
return pData->getApp();


+ 3
- 0
source/modules/distrho/src/DistrhoPluginCarla.cpp View File

@@ -46,6 +46,9 @@ public:
fUI(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, uiResizeCallback)
{
fUI.setTitle(host->uiName);

if (host->uiParentId != 0)
fUI.setTransientWinId(host->uiParentId);
}

// ---------------------------------------------


+ 5
- 0
source/modules/distrho/src/DistrhoUIInternal.hpp View File

@@ -223,6 +223,11 @@ public:
glWindow.setTitle(uiTitle);
}

void setTransientWinId(const intptr_t winId)
{
glWindow.setTransientWinId(winId);
}

void setVisible(const bool yesNo)
{
glWindow.setVisible(yesNo);


+ 1
- 1
source/modules/native-plugins/distrho-3bandeq.cpp View File

@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO

static const NativePluginDescriptor _3bandeqDesc = {
/* category */ PLUGIN_CATEGORY_EQ,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI),
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_USES_PARENT_ID),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS,
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS,


+ 1
- 1
source/modules/native-plugins/distrho-3bandsplitter.cpp View File

@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO

static const NativePluginDescriptor _3bandsplitterDesc = {
/* category */ PLUGIN_CATEGORY_EQ,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI),
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_USES_PARENT_ID),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS,
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS,


+ 1
- 1
source/modules/native-plugins/distrho-nekobi.cpp View File

@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO

static const NativePluginDescriptor nekobiDesc = {
/* category */ PLUGIN_CATEGORY_SYNTH,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_IS_SYNTH|PLUGIN_HAS_UI),
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_IS_SYNTH|PLUGIN_HAS_UI|PLUGIN_USES_PARENT_ID),
/* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_ALL_SOUND_OFF),
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS,
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS,


+ 1
- 1
source/modules/native-plugins/distrho-pingpongpan.cpp View File

@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO

static const NativePluginDescriptor pingpongpanDesc = {
/* category */ PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI),
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_USES_PARENT_ID),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS,
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS,


+ 1
- 1
source/modules/native-plugins/distrho-stereoenhancer.cpp View File

@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO

static const NativePluginDescriptor stereoenhancerDesc = {
/* category */ PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI),
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_USES_PARENT_ID),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS,
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS,


Loading…
Cancel
Save