diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index d3d4bbe3a7..2f2a33750c 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -3026,7 +3026,19 @@ tresult VST3HostContext::ContextMenu::popup (Steinberg::UCoord x, Steinberg::UCo PopupMenu::Options options; if (auto* ed = owner.getActiveEditor()) + { + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + if (auto* peer = ed->getPeer()) + { + auto scale = peer->getPlatformScaleFactor(); + + x = roundToInt (x / scale); + y = roundToInt (y / scale); + } + #endif + options = options.withTargetScreenArea (ed->getScreenBounds().translated ((int) x, (int) y).withSize (1, 1)); + } #if JUCE_MODAL_LOOPS_PERMITTED // Unfortunately, Steinberg's docs explicitly say this should be modal..