my AudioProcessorEditor needs to be notified if its Window gains focus. From the documentation I would have expected that
AudioProcessorEditor::broughtToFront() would be the correct notification for this. However its never called.
focusOfChildComponentChanged() is only called once clicked into one of its child components, but I need a notification when the plugin windows gains focus, without the need of clicking into one of the components inside the window.
What am I missing, or better how can my plugin be notified about its window gaining focus?
The Window is owned by the host… so no notification can be received
Really: there is no message/runloop notification flying around, that can be caught? Can this be acknowledged by somebody from Roli, please!
But why do you need to get that notification, to begin with?
The reason shouldn’t matter, but the plugin is controlling hardware. To support multiple instances the hardware needs to be assigned to one plugin instance: Preferably the one that has the focus.
Doesn’t the AudioProcessorEditor itself work like a normal Juce Component that can get focus? Is there some reason you need to be able to determine the focused status of the host owned window?
Correct, I am not interested in the focus state of the host owned windows; if the Component would gain focus (or could notify by other means) when the surrounding window is brought to front - I would be fine with it.