VST3 / TextEditor input doesn't repaint properly (JUCE 6.0.8)

This might be a blocker bug, looks like it hasn’t been posted here yet.

As of JUCE 6.0.8, TextEditor doesn’t repaint properly when using:

  • Windows 10
  • VST
  • A display scale > 100%
  • A high dpi capable host (I reproduced it reliably with Cubase 10.5 and Reaper)

Steps to reproduce:

  1. create template plugin project using the Projucer
  2. add a TextEditor component
  3. enable “repaint debugging”
  4. build VST3

Apparently the wrong area of the window gets invalidated when the repaint request gets triggered by keyboard input. Ordinary repaint works.

This is what it looks like:

image

I already tracked this down to juce_Component.cpp, internalRepaintUnchecked. I observed that auto peerBounds = peer->getBounds(); returns different values when the repaint request gets triggered by keyboard input.

The problem occurs regardless of enablement of “per monitor dpi aware”.

Bonus bug: Each time I open the plugin UI in Cubase, it gets a little larger.