STOP — revert HelperPluginHost to last known working state (GUI in Helper but with original window behavior before all my 'fixes')
Browse filesI've been making this worse. The original code worked — GUI opened inside
Ableton's window. The problem started when close-button fix changed window
behavior. Need to go back to what worked and make minimal close-button fix only."
3 unmodified lines4567897 unmodified lines17181920212253 unmodified lines767778798081138 unmodified lines2202212222232242252262272282292302312322332342352362372383 unmodified lines#include <pthread.h>#include <sched.h>HelperPluginHost::HelperPluginHost(){#if JUCE_PLUGINHOST_VST37 unmodified linesHelperPluginHost::~HelperPluginHost(){stopProcessing();unloadPlugin();}53 unmodified linesvoid HelperPluginHost::unloadPlugin(){if (plugin){plugin->releaseResources();138 unmodified lines}// --- GUI ---// GUI is NO LONGER handled by the Helper process.// It's now handled in-process by PluginBridgeEditor (inside Ableton).// These stubs remain for IPC compatibility but do nothing.void HelperPluginHost::showGui(){// No-op — GUI is shown in-process by PluginBridgeEditorDBG("HelperPluginHost::showGui() — no-op, GUI is in-process now");}void HelperPluginHost::hideGui(){// No-op}// --- State ---3 unmodified lines4567891011121314151617181920212223242526272829307 unmodified lines3839404142434453 unmodified lines9899100101102103104138 unmodified lines2432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832843 unmodified lines#include <pthread.h>#include <sched.h>#if JUCE_MAC#include <objc/objc.h>#include <objc/message.h>#endif// Custom windowclass PluginGuiWindow : public juce::DocumentWindow{public:PluginGuiWindow(const juce::String& name): DocumentWindow(name, juce::Colour(0xff1a1a2e), DocumentWindow::allButtons, true){setUsingNativeTitleBar(true);}void closeButtonPressed() override{setVisible(false);}};HelperPluginHost::HelperPluginHost(){#if JUCE_PLUGINHOST_VST37 unmodified linesHelperPluginHost::~HelperPluginHost(){stopProcessing();hideGui();unloadPlugin();}53 unmodified linesvoid HelperPluginHost::unloadPlugin(){hideGui();if (plugin){plugin->releaseResources();138 unmodified lines}// --- GUI ---void HelperPluginHost::showGui(){if (!plugin || !plugin->hasEditor()) return;juce::MessageManager::callAsync([this](){if (!plugin) return;if (guiWindow){guiWindow->setVisible(true);return;}auto* editor = plugin->createEditor();if (!editor) return;guiWindow = std::make_unique<PluginGuiWindow>(plugin->getName());guiWindow->setContentOwned(editor, true);guiWindow->setResizable(true, true);guiWindow->centreWithSize(editor->getWidth(), editor->getHeight());guiWindow->setVisible(true);});}void HelperPluginHost::hideGui(){if (guiWindow){juce::MessageManager::callAsync([this](){if (guiWindow)guiWindow->setVisible(false);});}}// --- State ---
Source/Helper/HelperPluginHost.cpp+52-6