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:
parent
fc3b460900
commit
198af04a4a
2 changed files with 12 additions and 4 deletions
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue