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
Previously, BadMatch errors were seen when there were several modal
windows, each with a native titlebar. Moving a window would attempt to
restack the windows, which was not possible because the JUCE windows
were not siblings. We actually need to restack the top level windows,
i.e. the windows containing the server-side decorations.
Calling AccessibilityHandler::getChildren() or getParent() may cause an AccessibilityHandler object to be created and an InternalAccessibilityEvent::elementCreated notification to be sent. Calling AndroidAccessibilityEvent.setSource may then cause a recursive populateNodeInfo() call.
Sometimes, changing the bounds of the window inside the DPICHANGED
handler can cause further DPI change events to be processed. Previously,
the scaleFactor set by the "inner" events was also being used when
notifying listeners about the "outer" events, leading to graphical
glitches.
An effect of the bug was that VST2 views in the AudioPluginHost would
occasionally render with an incorrect size and position after dragging
them between displays with different scale factors.
With this change in place, we only notify listeners and update window
bounds once there are no DPI changes in progress.