The issue was caused by DropShadower using the ComponentListener interface
to listen to its target Component's changes and creating shadow Components
only if the target was visible during the event callbacks. However it was
possible that during the events the target was not yet visible because one
of its parents was not visible. When the parent became visible it would not
trigger a callback for the observed child component.
The fix attaches a ComponentListener recursively to all parents starting
from the target and responds to each componentVisibilityChanged() event.
Clang versions 5 to 8 inclusive seem to struggle to compile JUCE when
JUCE_BEGIN_NO_SANITIZE is used. This is unexpected, as simpler programs
using the same macro definitions compile correctly on clang 5.
Native Instrument VST3s (I tested Kontakt and Supercharger) crash when
the bundleEntry function is called from a background thread on macOS.
This change disables scanning for VST3 plugins on a background thread
using the PluginListComponent, to allow loading these plugins in the
AudioPluginHost.
I can't find any "official" word on whether the bundleEntry and
bundleExit functions should be guaranteed to be made from the main
thread. However, the VST3PluginTestHost app seems to call these
functions exclusively from the main thread.
This fixes an issue with NI Raum and Choral where the editors would open
in a new window, rather than in the same window as the VST
AudioProcessorEditor.
Adds a mechanism to notify the host that the plugin state needs saving,
using updateHostDisplay.
Also allows JUCE hosts to detect when a plugin needs its state saving
via the AudioProcessorListener.
On macOS 10.15, stdatomic.h (included by the VST3 SDK) defines a macro
named atomic_thread_fence when building in C++20 mode. This macro was
trampling over a call to std::atomic_thread_fence from the C++ atomic
header, made in juce_Atomic.h.
No JUCE implementation files use the C11 atomic functions, so I think
it's safe to just undef the problematic symbol after including all the
VST3 implementation files.
When the result of find_if() is only compared to the container's end(),
the operation can normally be expressed more concisely using any_of(),
all_of(), or none_of().
Previously, on hi res displays, "Plogue AlterEgo" was opening with a
window that was too large, because the window size was applied before
the scale factor was known. When the scale factor was updated, the
window size was not changed if the window was hidden, so the window
would remain too large when it was shown.
Some plugins (e.g. FabFilter Pro-C 2) will reopen their windows at their
previous size, but without accounting for a new scale factor. For these
plugins, we need to explicitly set a scale factor of 1 before calling
getSize for the first time, in order to ensure that the plugin knows it
should return its desired unscaled size, and not its size at the scale
factor it was using last.
Other plugins (Surge) misreport their desired size when it is requested
before the window has become visible. For these plugins, we need to
re-request the plugin's desired window size after it has opened.
The problems above are mostly noticeable when opening/reopening plugins
on a hi-DPI display on Windows.
This fixes some issues with Izotope Ozone 9:
- Resizing would stutter, and could leave the view in an inconsistent
state.
- Closing and reopening the view after resizing would display black bars
around the editor view.
The root of the problem was that the call to Component::setSize() inside
the resizeView call checked whether the plugin supported resizing. If
not, it would force the embedded view back to the current size. This
behaviour is incorrect - if the plugin requests a resize via resizeView,
the new size should be applied whether or not the plugin "supports
resizing".
This fixes a bug on Windows where plugins that do not implement the
IPlugViewContentScaleSupport interface opened in the AudioPluginHost
with their editors in the very top left corner of the window, rather
than below the window's titlebar.
Examples of plugins with no scaling support, suitable for reproducing
the issue:
- U-He Hive 2.1.1 Rev 12092 x64
- FabFilter Pro-C 1.23 x64
The scaling machinery in the component peer was causing problems for
hosted plugin views. Scaling the plugin view size requires close
collaboration between the plugin and the host, and it's important for
the host to have exact control over the size of the plugin's view. The
removed code in the HWNDComponentPeer was modifying the sizes of
embedded plugin windows, which would often leave them at an incorrect
size.
The faulty behaviour was especially noticable with plugins that do not
support DPI-aware behaviour. I tested with the following plugins (VST2 +
VST3), which should all now display correctly in the AudioPluginHost,
and assume the correct size when opened on hi-res displays, or dragged
between displays with different scale factors:
- Plogue AlterEgo
- U-He Hive 2
- FabFilter Pro-C
- Native Instruments Supercharger
- Surge