mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
VST3: Fix issue where Ardour would repeatedly try to resize editors
Ardour seems to listen to the bounds of the plugin window, and will call `onSize` on the plugin editor when move/resize events are sent to the X window - even if the size of the window didn't really change. This can result in an infinite resize loop, where calling `onSize` on the VST3 instance sends a resize event to the plugin window, and this event causes Ardour to call `onSize` on the plugin view. To get around this, the Linux ComponentPeer will no longer request a bounds change from the window system if the requested bounds are the same as the current bounds.
This commit is contained in:
parent
68d30f9c8d
commit
d4e802016a
1 changed files with 7 additions and 2 deletions
|
|
@ -83,8 +83,13 @@ public:
|
|||
//==============================================================================
|
||||
void setBounds (const Rectangle<int>& newBounds, bool isNowFullScreen) override
|
||||
{
|
||||
bounds = newBounds.withSize (jmax (1, newBounds.getWidth()),
|
||||
jmax (1, newBounds.getHeight()));
|
||||
const auto correctedNewBounds = newBounds.withSize (jmax (1, newBounds.getWidth()),
|
||||
jmax (1, newBounds.getHeight()));
|
||||
|
||||
if (bounds == correctedNewBounds && fullScreen == isNowFullScreen)
|
||||
return;
|
||||
|
||||
bounds = correctedNewBounds;
|
||||
|
||||
updateScaleFactorFromNewBounds (bounds, false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue