From 77f8e48730a53985997477668557f3be5ea8dc12 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 10 Feb 2021 15:49:53 +0000 Subject: [PATCH] VST3: Fixed incorrect high-DPI plug-in initial window size in Live on Windows Live calls getSize() before the plug-in has been attached to the system window and can query the correct system scale factor, this size is then used to resize the plug-in after it has been attached resulting in an unscaled window size. --- modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 52d8c7d3b1..ec38d790fb 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -1319,6 +1319,11 @@ private: tresult PLUGIN_API getSize (ViewRect* size) override { + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + if (getHostType().isAbletonLive() && systemWindow == nullptr) + return kResultFalse; + #endif + if (size != nullptr && component != nullptr) { auto editorBounds = component->getSizeToContainChild();