1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-25 02:04:23 +00:00

AudioPluginHost: Allow plugin windows to handle application key commands

This commit is contained in:
reuk 2026-01-20 14:16:06 +00:00
parent fc3b460900
commit 198af04a4a
No known key found for this signature in database
2 changed files with 12 additions and 4 deletions

View file

@ -187,7 +187,10 @@ PluginWindow* PluginGraph::getOrCreateWindowFor (AudioProcessorGraph::Node* node
}
auto localDpiDisabler = makeDPIAwarenessDisablerForPlugin (description);
return activePluginWindows.add (new PluginWindow (node, type, activePluginWindows));
return activePluginWindows.add (new PluginWindow (node,
type,
activePluginWindows,
getCommandManager().getKeyMappings()));
}
}

View file

@ -169,10 +169,13 @@ public:
numTypes
};
PluginWindow (AudioProcessorGraph::Node* n, Type t, OwnedArray<PluginWindow>& windowList)
PluginWindow (AudioProcessorGraph::Node* n,
Type t,
OwnedArray<PluginWindow>& windowList,
KeyListener* keyListener)
: DocumentWindow (n->getProcessor()->getName() + getFormatSuffix (n->getProcessor()),
LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId),
DocumentWindow::minimiseButton | DocumentWindow::closeButton),
LookAndFeel::getDefaultLookAndFeel().findColour (backgroundColourId),
minimiseButton | closeButton),
activeWindowList (windowList),
node (n), type (t)
{
@ -206,6 +209,8 @@ public:
node->properties.set (getOpenProp (type), true);
setVisible (true);
addKeyListener (keyListener);
}
~PluginWindow() override