ScopedDPIAwarenessDisabler doesn’t seem to be deprecated, but it’s Windows-specific. This is a pretty confusing area, but I think you don’t need anything like that in a plugin. At least on Windows, DPI awareness is per thread, so you can’t really disable it on behalf of the host. Plugin DPI awareness is implemented in AudioProcessorEditor::setScaleFactor, so you can disable it by overriding setScaleFactor to do nothing.
Thank you for your answer, this is definitely the way to go. There are a few caveats I want to mention:
This does not work on the standalone build of a plugin (ok for my case).
When dragging the window between screens of different DPI settings, the editor window seems to magically gain or loose 10x32 pixels depending on the direction. The components will hence be cropped or an empty space around them will occur. I tried to call setSize() in the setScaleFactor() function as well to override the new size, which doesn’t help. It seems the window enclosing the PluginEditor is being shrunk.
All this was tested on Windows / Bitwig, I will investigate further and post my results here.
All implementations of multimonitor dpi awareness on Windows seem to have one problem or another, I guess it’s one of those cases where Microsoft’s docs are not particularly clear. Unfortunately, I don’t have many options to test this, as the only multimonitor dpi aware host I have is Reaper, besides AudioPluginHost, and an empty setScaleFactor seems to work in both. otoh, the base implementation doesn’t quite work in Reaper -the plugin is correctly scaled, but its window is not. With all the little workarounds, it’s hard to say if it’s a Juce bug or a Reaper bug -the same may apply to Bitwig.