Is the following code in juce_dispatchNextMessageOnSystemQueue important? It is causing plugins the run in my app to crash, I guess they aren’t expecting the focus to change.
if (GetWindowLong (m.hwnd, GWLP_USERDATA) != improbableWindowNumber)
{
// if it's someone else's window being clicked on, give it the kb focus
if (m.message == WM_LBUTTONDOWN || m.message == WM_RBUTTONDOWN)
SetFocus (m.hwnd);
}