Hello. I have two components, A and B, with hundreds of juce widgets. When A or B gains/losts the keyboard focus it gets repainted.
If A is focused, and one of his children components gains the focus A::focusLost() is called (and I’d paint it using Component::hasKeyboardFocus(true)), but then if I swich to B, A::focusLost() won’t be called (just A::childComp::focusLost()) , and A won’t be repainted.
Is it possible to call A::focusLost() when none of A’s children neither A have the focus?
the focus behaviour there looks correct. However, if you need to repaint A when a child loses the focus, can you have the child component signal repaint to the parent.
ie override Component::focusGained and focusLost and make them do that you want.
That means I might redefine all juce widgets overriding their focusGained() and focusLost(), and add a pointer to the parent (or grand-parent) I want to repaint. Too messy.
Must be something simpler and less alike spaghetti code, isn’t it?