AUv2 plugins on Arm that are hosted out-of-process (e.g. in Logic 10.7)
can sometimes crash due to endlessly recursing through becomeKeyWindow.
This tends to happen when displaying a secondary window in a plugin,
e.g. an AlertWindow, then clicking on a secondary app, then clicking
back on the AlertWindow.
To avoid this case, we check that the peer isn't already key before
calling makeKeyWindow.
Unfortunately, we can't use isKeyWindow to avoid the recursion because
this may not return true until after becomeKeyWindow has returned.
The previous method for finding the dialog's owner was ineffective, and
it was still possible for other windows to obscure the file picker in
many cases. Using GetActiveWindow seems to produce the expected
behaviour.
Without this VoiceOver will iterate over menu items left to right first,
and iteration order will be affected by whether the PopupMenu gets
broken up into multiple columns due to not enough screen space.
Without this event Components such as Button would remain in a hover
state indefinitely after being clicked on a touch screen. The simulated
event matches the behaviour of the other platforms.
This allows paths that are prefixed with environment variables to behave
as expected. This is useful when scanning the default LV2 locations in
the AudioPluginHost on Windows.
Previously, for the following snippet, the menu's LnF was incorrectly
being forced to the default LnF. The correct behaviour is to display the
menu using LnF v4. The menu doesn't have an explicit LnF set, so it
should use the LnF of its parent component.
LookAndFeel::setDefaultLookAndFeel (&lookAndFeel_V1);
setLookAndFeel (&lookAndFeel_V4);
PopupMenu().showMenuAsync (PopupMenu::Options{}.withParentComponent (this));
When the mouse moves from one window to another, the mouseExit event
for the old window can occur after the mouseMove event for the new.
Until this commit this would cause the MouseInputSource to be
associated with the old window, and getComponentUnderMouse() would
incorrectly return a nullptr.
Without this MouseInputSource::getComponentUnderMouse() will report a
stale value after moving the cursor within a single peer using
MouseInputSource::setRawMousePosition().