When FileChooser instances were created, launched, and hidden all inside
the same event callback on macOS 12.0.1, the chooser dialog sometimes
remained open. This could cause problems including crashes, as closing
the dialog would attempt to call a completion handler block referencing
an already-deleted FileChooser::Native instance.
Opening the chooser panel later on the message thread seems to resolve
the issue.
This mirrors the behaviour on Linux, where maximizing a window always
fills the screen, even if a constrainer is active.
If you don't want to allow your component to fill the screen, disable
the maximize button in the window's titlebar when creating the window
(i.e. ensure DocumentWindow::maximiseButton is not set in the required
buttons).
This change allows mouse events (including enter and exit events) to
reach unfocused views on macOS. This matches the behaviour of unfocused
windows on Linux and Windows, where components paint in their "hovered"
states even when the application window is in the background.
As a byproduct of using tracking areas on macOS, we can remove the fake
mouse move generator.
This new factoring is a bit more typesafe, as it avoids casting
internals to void*.
It also allows cursors to scale appropriately on high resolution
displays on Windows.
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