1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

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.
This commit is contained in:
reuk 2021-11-08 19:28:25 +00:00
parent 2884610d01
commit 7828cad753
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

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)