Browse Source

VST2 Host: Fix window titlebar repainting when editor sizes change

When opening the "settings" menu of Arturia Pigments VST2, the editor
window would move itself over the JUCE non-native titlebar in the
AudioPluginHost. Then, when the editor was moved back into the correct
location, the titlebar would not be redrawn, leaving it in an incorrect
state.

This change forces a repaint of the editor's peer whenever the size
changes, forcing the titlebar to repaint after the editor has moved.
v6.1.6
reuk 4 years ago
parent
commit
7828cad753
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp

+ 11
- 0
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -2917,6 +2917,17 @@ public:
0,
0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
MessageManager::callAsync ([ref = SafePointer<Component> (this)]
{
// Clean up after the editor window, in case it tried to move itself
// into the wrong location over this component.
if (ref == nullptr)
return;
if (auto* p = ref->getPeer())
p->repaint (p->getBounds().withPosition ({}));
});
}
#elif JUCE_LINUX || JUCE_BSD
if (pluginWindow != 0)


Loading…
Cancel
Save