Previously, the top-level modal dismiss broadcaster would attempt to
dismiss all modals when the native file chooser was brought to the front
or clicked. This would end up calling Component::inputAttemptWhenModal,
which would bring the FileChooser's Component to the front, interrupting
the mouse click.
The fix is to avoid bringing the plugin window to the front when the
FileChooser is in a modal state. As the chooser is a native window, the
system should take care of enforcing the expected modal behaviour.
It's not clear why this issue only affects Cantabile. It seems that in
Cantabile, events from the native FileChooser get sent to the plugin
editor's parent HWND, whereas this doesn't happen in other hosts.
Perhaps Cantabile is hooking/intercepting window messages in some way.
This commit fixes a bug where a View would be registered as it's own
parent in the accessibility hierarchy leading to stack overflows in the
Android accessibility service. The issue affected up-to-date Android 13
systems and potentially older systems with updated accessibility
services.
When clearing deferredRepaints in drawRect, dirty regions in the 'next'
frame could be incorrectly removed while drawing the 'current' frame.
Now, deferredRepaints is cleared in setNeedsDisplayRectangles, as it
was before 9d50ab6c59.
The main change is that the numFramesToSkipMetalRenderer member has been
removed. The old mechanism had some problems in AU plugins in Logic.
Specifically, when opening a temporary window, repaints would be ignored
until the numFramesToSkipMetalRenderer counter had been decremented to
zero. In practice, this meant that a PopupMenu might not repaint until
the highlighted item had changed five times or more.
With this change applied, repaints that were requested for a particular
window size will use the metal renderer as long as the window hasn't
changed size in the meantime.
In some cases, processing key inputs may cause the currently-focused
text input target to be destroyed. If this happens, we shouldn't attempt
to reset the underlining on the target. We now reset the underlining
before processing key presses.
- Created a new detail namespace
- Moved shared module implementation details into the detail namespace
- Split dependencies so source files only rely on details in the detail namespace
- Removed all code from the juce_gui_basics.cpp file
Fixes a bug on Windows when opening a FileChooser with the following
arguments.
FileChooser ("",
"C:\path\to\file", // filename 'file' doesn't contain '.'
"", // all extensions are allowed
true);
The expected behaviour is that the initially-displayed filename is
"file".
The actual behaviour was that the initially-displayed filename was
"file.file".
The biggest new feature in this commit is the addition of
NativeMessageBox::scopedAsync and AlertWindow::scopedAsync, both of
which return an instance of ScopedMessageBox that will hide the message
box in its destructor.
The code for displaying modal dialogs on Windows has also been updated.
Now, the dialog itself is run from a new thread with its own message
loop. This means that when the dialog is dismissed, the background
thread can be joined safely. In plugins, this means that there's no
danger of the plugin view being destroyed from within the message box
runloop, for example.
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 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.