Maschine 3 unconventional path to re-open a VST3 plugin UI

Hi folks and bots,

In most DAW’s the PluginEditor is being constructed/destructed every time that the UI is opened/closed but I’m realizing Maschine 3 is not doing this. I’m not even able to capture when the plugin is being opened via the visibilityChangedor parentHierarchyChanged overriden methods. Is anybody familiar with this? How can I capture the moment the plugin UI is re-opened in Maschine 3?

Claude is telling me to use native Windows and MacOS methods to query whether the component is visible. Are there any alternatives to that?

I don’t have Maschine 3 so I cannot comment that that. Have you tried to check `isShowing()` with a slow timer?

Thanks zsliu98! The problem with Component::isShowing() is that internally it only checks natively whether it is minimized:

bool Component::isShowing() const
{
  if (! flags.visibleFlag)
    return false;
  
  if (parentComponent != nullptr)
    return parentComponent->isShowing();

  if (auto* peer = getPeer())
    return ! peer->isMinimised();

  return false;
}

Then there is ComponentPeer::isShowing() which does the job but misses “isHiddenOrHasHiddenAncestor” on the macOS implementation …

JUCE team: It would be nice to have in juce_NSViewComponentPeer_mac.mm:

bool isShowing() const override
{
    if (! [window isVisible] || isMinimised())
        return false;

    return ! checkHiddenAncestors || ! [view isHiddenOrHasHiddenAncestor];
}

instead of the current:

bool isShowing() const override
{
    return [window isVisible] && ! isMinimised();
}

(I have just added a formal Feature Request for that)