@@ -687,7 +687,10 @@ public: | |||||
fIsUiVisible = yesNo; | fIsUiVisible = yesNo; | ||||
if (! yesNo) | if (! yesNo) | ||||
{ | |||||
pData->transientTryCounter = 0; | |||||
return; | return; | ||||
} | |||||
if ((fDescriptor->hints & ::PLUGIN_USES_PARENT_ID) == 0) | if ((fDescriptor->hints & ::PLUGIN_USES_PARENT_ID) == 0) | ||||
pData->tryTransient(); | pData->tryTransient(); | ||||
@@ -61,6 +61,8 @@ public: | |||||
void setTitle(const char* title); | void setTitle(const char* title); | ||||
void setTransientWinId(intptr_t winId); | |||||
App& getApp() const noexcept; | App& getApp() const noexcept; | ||||
uint32_t getEventTimestamp() const; | uint32_t getEventTimestamp() const; | ||||
int getModifiers() const; | int getModifiers() const; | ||||
@@ -459,6 +459,19 @@ public: | |||||
#endif | #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 | App& getApp() const noexcept | ||||
{ | { | ||||
return fApp; | return fApp; | ||||
@@ -873,6 +886,11 @@ void Window::setTitle(const char* title) | |||||
pData->setTitle(title); | pData->setTitle(title); | ||||
} | } | ||||
void Window::setTransientWinId(intptr_t winId) | |||||
{ | |||||
pData->setTransientWinId(winId); | |||||
} | |||||
App& Window::getApp() const noexcept | App& Window::getApp() const noexcept | ||||
{ | { | ||||
return pData->getApp(); | return pData->getApp(); | ||||
@@ -46,6 +46,9 @@ public: | |||||
fUI(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, uiResizeCallback) | fUI(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, uiResizeCallback) | ||||
{ | { | ||||
fUI.setTitle(host->uiName); | fUI.setTitle(host->uiName); | ||||
if (host->uiParentId != 0) | |||||
fUI.setTransientWinId(host->uiParentId); | |||||
} | } | ||||
// --------------------------------------------- | // --------------------------------------------- | ||||
@@ -223,6 +223,11 @@ public: | |||||
glWindow.setTitle(uiTitle); | glWindow.setTitle(uiTitle); | ||||
} | } | ||||
void setTransientWinId(const intptr_t winId) | |||||
{ | |||||
glWindow.setTransientWinId(winId); | |||||
} | |||||
void setVisible(const bool yesNo) | void setVisible(const bool yesNo) | ||||
{ | { | ||||
glWindow.setVisible(yesNo); | glWindow.setVisible(yesNo); | ||||
@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO | |||||
static const NativePluginDescriptor _3bandeqDesc = { | static const NativePluginDescriptor _3bandeqDesc = { | ||||
/* category */ PLUGIN_CATEGORY_EQ, | /* 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), | /* supports */ static_cast<NativePluginSupports>(0x0), | ||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO | |||||
static const NativePluginDescriptor _3bandsplitterDesc = { | static const NativePluginDescriptor _3bandsplitterDesc = { | ||||
/* category */ PLUGIN_CATEGORY_EQ, | /* 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), | /* supports */ static_cast<NativePluginSupports>(0x0), | ||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO | |||||
static const NativePluginDescriptor nekobiDesc = { | static const NativePluginDescriptor nekobiDesc = { | ||||
/* category */ PLUGIN_CATEGORY_SYNTH, | /* 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), | /* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_ALL_SOUND_OFF), | ||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO | |||||
static const NativePluginDescriptor pingpongpanDesc = { | static const NativePluginDescriptor pingpongpanDesc = { | ||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* 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), | /* supports */ static_cast<NativePluginSupports>(0x0), | ||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
@@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO | |||||
static const NativePluginDescriptor stereoenhancerDesc = { | static const NativePluginDescriptor stereoenhancerDesc = { | ||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* 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), | /* supports */ static_cast<NativePluginSupports>(0x0), | ||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||