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

VST Host: Fix issue where the Component bounds computed for a hosted editor on Linux could be incorrect for non-unity scale factors

This commit is contained in:
reuk 2025-11-06 18:51:21 +00:00
parent 8e4832dcf5
commit 28aa387f8d
No known key found for this signature in database

View file

@ -650,18 +650,18 @@ private:
void operator() (float platformScale) const
{
MessageManager::callAsync ([ref = Component::SafePointer<VSTPluginWindow> (&window), platformScale]
MessageManager::callAsync ([ref = SafePointer (&window), platformScale]
{
if (auto* r = ref.getComponent())
{
r->nativeScaleFactor = platformScale;
r->setContentScaleFactor();
#if JUCE_WINDOWS
r->resizeToFit();
r->embeddedComponent.updateHWNDBounds();
#endif
r->componentMovedOrResized (true, true);
Vst2::ERect* rect = nullptr;
r->dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0);
if (rect != nullptr)
r->updateSizeFromEditor (rect->right - rect->left, rect->bottom - rect->top);
}
});
}
@ -809,7 +809,6 @@ private:
updateHostDisplay (AudioProcessorListener::ChangeDetails().withProgramChanged (true)
.withParameterInfoChanged (true));
}
};
//==============================================================================