Signed-off-by: falkTX <falktx@gmail.com>tags/v2.1-alpha1-winvst
@@ -1232,7 +1232,7 @@ public: | |||||
else | else | ||||
pData->name = pData->engine->getUniquePluginName(fInstance->getName().toRawUTF8()); | pData->name = pData->engine->getUniquePluginName(fInstance->getName().toRawUTF8()); | ||||
if (filename != nullptr && pData->filename[0] != '\0') | |||||
if (filename != nullptr && filename[0] != '\0') | |||||
pData->filename = carla_strdup(filename); | pData->filename = carla_strdup(filename); | ||||
// --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
@@ -251,8 +251,10 @@ public: | |||||
gIsInitiated = true; | gIsInitiated = true; | ||||
#if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | #if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | ||||
# ifndef CARLA_OS_WIN | |||||
static const int argc = 0; | static const int argc = 0; | ||||
static const char* argv[] = {}; | static const char* argv[] = {}; | ||||
# endif | |||||
juce::JUCEApplicationBase::createInstance = &juce_CreateApplication; | juce::JUCEApplicationBase::createInstance = &juce_CreateApplication; | ||||
juce::JUCEApplicationBase::main(JUCE_MAIN_FUNCTION_ARGS); | juce::JUCEApplicationBase::main(JUCE_MAIN_FUNCTION_ARGS); | ||||
#else | #else | ||||
@@ -125,6 +125,13 @@ private: | |||||
[parentWindow addChildWindow:window | [parentWindow addChildWindow:window | ||||
ordered:NSWindowAbove]; | ordered:NSWindowAbove]; | ||||
#endif | #endif | ||||
#if JUCE_WINDOWS | |||||
const HWND window = (HWND)getWindowHandle(); | |||||
CARLA_SAFE_ASSERT_RETURN(window != nullptr,); | |||||
SetWindowLongPtr(window, GWLP_HWNDPARENT, static_cast<LONG_PTR>(fTransientId)); | |||||
#endif | |||||
} | } | ||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(JucePluginWindow) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(JucePluginWindow) | ||||