Browse Source

Fix osx build

tags/1.9.6
falkTX 9 years ago
parent
commit
181d77f135
2 changed files with 56 additions and 44 deletions
  1. +1
    -1
      data/linux/make-binary.sh
  2. +55
    -43
      source/modules/juce_audio_processors/juce_audio_processors.cpp

+ 1
- 1
data/linux/make-binary.sh View File

@@ -6,7 +6,7 @@ if [ -f Makefile ]; then
cd data/linux
fi

VERSION="1.9.5~git20150228"
VERSION="1.9.5~git20150307"

if [ ! -f carla-git-static_"$VERSION"_amd64.deb ]; then
wget -c https://launchpad.net/~kxstudio-debian/+archive/ubuntu/testing/+files/carla-git-static_"$VERSION"_amd64.deb


+ 55
- 43
source/modules/juce_audio_processors/juce_audio_processors.cpp View File

@@ -79,61 +79,73 @@ static inline bool arrayContainsPlugin (const OwnedArray<PluginDescription>& lis
#if JUCE_MAC
//==============================================================================
struct AutoResizingNSViewComponent : public NSViewComponent,
private AsyncUpdater
{
AutoResizingNSViewComponent() : recursive (false) {}
void childBoundsChanged (Component*) override
{
if (recursive)
{
triggerAsyncUpdate();
}
else
{
recursive = true;
resizeToFitView();
recursive = true;
}
}
void handleAsyncUpdate() override { resizeToFitView(); }
struct AutoResizingNSViewComponent : public NSViewComponent,
private AsyncUpdater {
AutoResizingNSViewComponent();
void childBoundsChanged(Component*) override;
void handleAsyncUpdate() override;
bool recursive;
};
struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewComponent,
private Timer {
AutoResizingNSViewComponentWithParent();
NSView* getChildView() const;
void timerCallback() override;
};
//==============================================================================
struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewComponent,
private Timer
AutoResizingNSViewComponent::AutoResizingNSViewComponent()
: recursive (false) {}
void AutoResizingNSViewComponent::childBoundsChanged(Component*)
{
AutoResizingNSViewComponentWithParent()
if (recursive)
{
NSView* v = [[NSView alloc] init];
setView (v);
[v release];
startTimer (30);
triggerAsyncUpdate();
}
NSView* getChildView() const
else
{
if (NSView* parent = (NSView*) getView())
if ([[parent subviews] count] > 0)
return [[parent subviews] objectAtIndex: 0];
return nil;
recursive = true;
resizeToFitView();
recursive = true;
}
}
void timerCallback() override
void AutoResizingNSViewComponent::handleAsyncUpdate()
{
resizeToFitView();
}
AutoResizingNSViewComponentWithParent::AutoResizingNSViewComponentWithParent()
{
NSView* v = [[NSView alloc] init];
setView (v);
[v release];
startTimer(500);
}
NSView* AutoResizingNSViewComponentWithParent::getChildView() const
{
if (NSView* parent = (NSView*)getView())
if ([[parent subviews] count] > 0)
return [[parent subviews] objectAtIndex: 0];
return nil;
}
void AutoResizingNSViewComponentWithParent::timerCallback()
{
if (NSView* child = getChildView())
{
if (NSView* child = getChildView())
{
stopTimer();
setView (child);
}
stopTimer();
setView(child);
}
};
}
#endif
#if JUCE_CLANG


Loading…
Cancel
Save