This happens at least on Windows (XP and Vista) and Linux (Ubuntu Hardy), have no Mac here to test there.
In the Windows windowing code is no special handling for the ComponentPeer::windowIsTemporary flag in the window creating code. In the Linux windowing code the _NET_WM_WINDOW_TYPE_MENU atom is set if ComponentPeer::windowIsTemporary flag is set. I would expect that to help but it doesn’t.
In the Windows windowing code these lines are the essential lines:
[code] case WM_MOUSEACTIVATE:
if (! component->getMouseClickGrabsKeyboardFocus())
For Windows this effect can be reproduced using the JUCE demo. Just open any of the menus of the demo and click on a menu item, but don’t release the mouse button. As long as you hold the mouse button down the main demo windows taskbar button is not the active one, because the temporary menu windows got focus as you clicked on it. Setting MouseClickGrabsKeyboardFocus to false for the PopupMenuWindow solves this problem on windows, but not on Linux.