Browse Source

VST hosting: tweaked the way 64-bit plugin NSViews are created, to avoid an extra intermediate parent NSView which seems to break some plugins.

tags/2021-05-28
jules 10 years ago
parent
commit
7c0d0ae677
1 changed files with 13 additions and 16 deletions
  1. +13
    -16
      modules/juce_audio_processors/juce_audio_processors.cpp

+ 13
- 16
modules/juce_audio_processors/juce_audio_processors.cpp View File

@@ -112,27 +112,24 @@ struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewCompone
setView (v);
[v release];
startTimer (100);
startTimer (30);
}
void timerCallback() override
NSView* getChildView() const
{
if (NSView* parent = (NSView*) getView())
{
if ([[parent subviews] count] > 0)
{
if (NSView* child = [[parent subviews] objectAtIndex: 0])
{
NSRect f = [parent frame];
NSSize newSize = [child frame].size;
if (f.size.width != newSize.width || f.size.height != newSize.height)
{
f.size = newSize;
[parent setFrame: f];
}
}
}
return [[parent subviews] objectAtIndex: 0];
return nil;
}
void timerCallback() override
{
if (NSView* child = getChildView())
{
stopTimer();
setView (child);
}
}
};


Loading…
Cancel
Save