From ea84e14be0220e19f541ff38caa93316737d2204 Mon Sep 17 00:00:00 2001 From: chroma Date: Thu, 11 Aug 2022 16:17:06 +0100 Subject: [PATCH] VST Host: Avoid sending unnecessary window size messages to non-DPI-aware plugins Fixes an issue on Windows that caused superfluous HWND messages on DPI aware plugins that resulted in dismissing focused components. --- .../format_types/juce_VSTPluginFormat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 499c39ccbe..fbbc1a4f6b 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -3262,10 +3262,9 @@ private: if (! isWindowSizeCorrectForPlugin (w, h)) { updateSizeFromEditor (w, h); + embeddedComponent.updateHWNDBounds(); sizeCheckCount = 0; } - - embeddedComponent.updateHWNDBounds(); } void checkPluginWindowSize() @@ -3349,6 +3348,7 @@ private: #if JUCE_WINDOWS r->resizeToFit(); + r->embeddedComponent.updateHWNDBounds(); #endif r->componentMovedOrResized (true, true); }