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.
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.
Previously, things like PopupMenus which were created in their own
windows were not being scaled correctly on HiDPI displays on Linux.
This patch forces the display scale to 1.0 in plugins, meaning that
the transform applied to the main plugin window is the sole source
of truth for component scaling in plugins.
Previously we were choosing a Visual and Colormap on initialisation of the X11 Display which could lead to bugs when opening a window with different visual and colour requirements. This commit makes 16, 24 and 32-bit visuals available and chooses the correct one when opening a window.