| @@ -2198,6 +2198,7 @@ void CarlaPlugin::uiIdle() | |||||
| pData->postUiEvents.data.clear(); | pData->postUiEvents.data.clear(); | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| if (pData->transientTryCounter == 0) | if (pData->transientTryCounter == 0) | ||||
| return; | return; | ||||
| if (++pData->transientTryCounter % 10 != 0) | if (++pData->transientTryCounter % 10 != 0) | ||||
| @@ -2216,6 +2217,7 @@ void CarlaPlugin::uiIdle() | |||||
| pData->transientTryCounter = 0; | pData->transientTryCounter = 0; | ||||
| pData->transientFirstTry = false; | pData->transientFirstTry = false; | ||||
| } | } | ||||
| #endif | |||||
| } | } | ||||
| void CarlaPlugin::uiParameterChange(const uint32_t index, const float value) noexcept | void CarlaPlugin::uiParameterChange(const uint32_t index, const float value) noexcept | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin Bridge | * Carla Plugin Bridge | ||||
| * Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -391,9 +391,11 @@ public: | |||||
| { | { | ||||
| carla_debug("CarlaPluginBridge::~CarlaPluginBridge()"); | carla_debug("CarlaPluginBridge::~CarlaPluginBridge()"); | ||||
| #ifndef BUILD_BRIDGE | |||||
| // close UI | // close UI | ||||
| if (pData->hints & PLUGIN_HAS_CUSTOM_UI) | if (pData->hints & PLUGIN_HAS_CUSTOM_UI) | ||||
| pData->transientTryCounter = 0; | pData->transientTryCounter = 0; | ||||
| #endif | |||||
| pData->singleMutex.lock(); | pData->singleMutex.lock(); | ||||
| pData->masterMutex.lock(); | pData->masterMutex.lock(); | ||||
| @@ -2175,7 +2177,9 @@ public: | |||||
| break; | break; | ||||
| case kPluginBridgeNonRtServerUiClosed: | case kPluginBridgeNonRtServerUiClosed: | ||||
| #ifndef BUILD_BRIDGE | |||||
| pData->transientTryCounter = 0; | pData->transientTryCounter = 0; | ||||
| #endif | |||||
| pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); | pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); | ||||
| break; | break; | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin, DSSI implementation | * Carla Plugin, DSSI implementation | ||||
| * Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -669,7 +669,9 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| pData->transientTryCounter = 0; | pData->transientTryCounter = 0; | ||||
| #endif | |||||
| if (fOscData.target != nullptr) | if (fOscData.target != nullptr) | ||||
| { | { | ||||
| @@ -2333,8 +2335,10 @@ public: | |||||
| for (uint32_t i=0; i < pData->param.count; ++i) | for (uint32_t i=0; i < pData->param.count; ++i) | ||||
| osc_send_control(fOscData, pData->param.data[i].rindex, getParameterValue(i)); | osc_send_control(fOscData, pData->param.data[i].rindex, getParameterValue(i)); | ||||
| #ifndef BUILD_BRIDGE | |||||
| if (pData->engine->getOptions().frontendWinId != 0) | if (pData->engine->getOptions().frontendWinId != 0) | ||||
| pData->transientTryCounter = 1; | pData->transientTryCounter = 1; | ||||
| #endif | |||||
| carla_stdout("CarlaPluginDSSI::updateOscData() - done"); | carla_stdout("CarlaPluginDSSI::updateOscData() - done"); | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin | * Carla Plugin | ||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -591,8 +591,10 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||||
| uiLib(nullptr), | uiLib(nullptr), | ||||
| ctrlChannel(0), | ctrlChannel(0), | ||||
| extraHints(0x0), | extraHints(0x0), | ||||
| #ifndef BUILD_BRIDGE | |||||
| transientTryCounter(0), | transientTryCounter(0), | ||||
| transientFirstTry(true), | transientFirstTry(true), | ||||
| #endif | |||||
| name(nullptr), | name(nullptr), | ||||
| filename(nullptr), | filename(nullptr), | ||||
| iconName(nullptr), | iconName(nullptr), | ||||
| @@ -620,7 +622,9 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||||
| CarlaPlugin::ProtectedData::~ProtectedData() noexcept | CarlaPlugin::ProtectedData::~ProtectedData() noexcept | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT(! (active && needsReset)); | CARLA_SAFE_ASSERT(! (active && needsReset)); | ||||
| #ifndef BUILD_BRIDGE | |||||
| CARLA_SAFE_ASSERT(transientTryCounter == 0); | CARLA_SAFE_ASSERT(transientTryCounter == 0); | ||||
| #endif | |||||
| { | { | ||||
| // mutex MUST have been locked before | // mutex MUST have been locked before | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin | * Carla Plugin | ||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -227,8 +227,10 @@ struct CarlaPlugin::ProtectedData { | |||||
| // misc | // misc | ||||
| int8_t ctrlChannel; | int8_t ctrlChannel; | ||||
| uint extraHints; | uint extraHints; | ||||
| #ifndef BUILD_BRIDGE | |||||
| uint transientTryCounter; | uint transientTryCounter; | ||||
| bool transientFirstTry; | bool transientFirstTry; | ||||
| #endif | |||||
| // data 1 | // data 1 | ||||
| const char* name; | const char* name; | ||||
| @@ -1284,8 +1284,10 @@ public: | |||||
| const uintptr_t frontendWinId(pData->engine->getOptions().frontendWinId); | const uintptr_t frontendWinId(pData->engine->getOptions().frontendWinId); | ||||
| #ifndef BUILD_BRIDGE | |||||
| if (! yesNo) | if (! yesNo) | ||||
| pData->transientTryCounter = 0; | pData->transientTryCounter = 0; | ||||
| #endif | |||||
| if (fUI.type == UI::TYPE_BRIDGE) | if (fUI.type == UI::TYPE_BRIDGE) | ||||
| { | { | ||||
| @@ -1575,7 +1577,9 @@ public: | |||||
| fPipeServer.stopPipeServer(2000); | fPipeServer.stopPipeServer(2000); | ||||
| // fall through | // fall through | ||||
| case CarlaPipeServerLV2::UiCrashed: | case CarlaPipeServerLV2::UiCrashed: | ||||
| #ifndef BUILD_BRIDGE | |||||
| pData->transientTryCounter = 0; | pData->transientTryCounter = 0; | ||||
| #endif | |||||
| pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); | pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); | ||||
| break; | break; | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Native Plugin | * Carla Native Plugin | ||||
| * Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -229,7 +229,9 @@ public: | |||||
| if (fIsUiVisible && fDescriptor != nullptr && fDescriptor->ui_show != nullptr && fHandle != nullptr) | if (fIsUiVisible && fDescriptor != nullptr && fDescriptor->ui_show != nullptr && fHandle != nullptr) | ||||
| fDescriptor->ui_show(fHandle, false); | fDescriptor->ui_show(fHandle, false); | ||||
| #ifndef BUILD_BRIDGE | |||||
| pData->transientTryCounter = 0; | pData->transientTryCounter = 0; | ||||
| #endif | |||||
| } | } | ||||
| pData->singleMutex.lock(); | pData->singleMutex.lock(); | ||||
| @@ -751,7 +753,9 @@ public: | |||||
| if (! yesNo) | if (! yesNo) | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| pData->transientTryCounter = 0; | pData->transientTryCounter = 0; | ||||
| #endif | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -853,6 +853,7 @@ LRESULT CALLBACK wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | |||||
| // ----------------------------------------------------- | // ----------------------------------------------------- | ||||
| #ifndef BUILD_BRIDGE | |||||
| bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI) | bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI) | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(uiTitle != nullptr && uiTitle[0] != '\0', true); | CARLA_SAFE_ASSERT_RETURN(uiTitle != nullptr && uiTitle[0] != '\0', true); | ||||
| @@ -1140,6 +1141,7 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons | |||||
| return true; | return true; | ||||
| (void)pid; (void)centerUI; | (void)pid; (void)centerUI; | ||||
| } | } | ||||
| #endif // BUILD_BRIDGE | |||||
| // ----------------------------------------------------- | // ----------------------------------------------------- | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin UI | * Carla Plugin UI | ||||
| * Copyright (C) 2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2014-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -46,7 +46,9 @@ public: | |||||
| virtual void* getDisplay() const noexcept = 0; | virtual void* getDisplay() const noexcept = 0; | ||||
| #endif | #endif | ||||
| #ifndef BUILD_BRIDGE | |||||
| static bool tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI); | static bool tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI); | ||||
| #endif | |||||
| #ifdef CARLA_OS_MAC | #ifdef CARLA_OS_MAC | ||||
| static CarlaPluginUI* newCocoa(Callback*, uintptr_t, bool); | static CarlaPluginUI* newCocoa(Callback*, uintptr_t, bool); | ||||