[JUCE6][WIN][VST3] Move plugin between screens with different scale factors


since upgrading to JUCE 6 I experience new issues when moving VST3 plugins between screens with different scale factors on Windows (for example internal laptop screen factor 1.5, attached external screen factor 1.0).

The host window changes size erroneously and the plugin editor is either cropped or a black border is shown around it. It only appears with resizeable editors and VST3 but in all hosts that allow HiDPI rendering of plugins (Reaper 6, Bitwig, Ableton Live).

How to reproduce:

  1. Create a plugin with an empty edior but set it to be resizeable

         SimplePluginAudioProcessorEditor::SimplePluginAudioProcessorEditor             (SimplePluginAudioProcessor& p)
                 : AudioProcessorEditor (&p), audioProcessor (p)
                 setSize (400, 300);
                 setResizable(true, true);
                 setResizeLimits(100, 100, 900, 900);
  2. Load the plugin e.g. in Ableton Live. Make sure the plugin is not stretched but rendered in HiDPI mode (right-click on the plugin in the list, disable auto scaling)

  3. Move the plugin editor between the screens. One can observe different kind of errors depending on the speed of movement and how fast the mous ebutton is released after the movement.

I debugged the respective JUCE code for a while now but could not find anything helpful. It appears that the host calls JuceVST3Editor::onSize() and sets the window to the wrong size a short time after JUCE has layed out all components correctly. So at first glance it looks like a host bug but as it appears in all hosts I have tested and other plugins work correctly and it also worked in JUCE 5 I suspect JUCE is doing something wrong here…

Any ideas how to fix that?


1 Like

Hi JUCE devs, would you mind having a brief look? Maybe it’s just a simple fix for an insider… It worked before in JUCE 5.