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:
parent
8e4832dcf5
commit
28aa387f8d
1 changed files with 6 additions and 7 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue