We’re doing some fancy keyboard focus stuff at the request of users who need special handling for their particular DAW’s. To do this, we have to call setWantsKeyboardFocus based on a number of factors that might change over time.
Mostly this works great except for JUCE’s handling of lastFocusedComponent. In particular, the ComponentPeer tries to give back focus to the lastFocusedComponent even if wantsFocusFlag is false. Is it possible to add a check that lastFocusedComponent actually wants keyboard focus before giving it back?
Hmm, looks to me like that could end up being recursive in some situations - I think that’s why the code was written the way it was, and why it set the pointer directly rather than invoking another function to change it.