Skip to content

Commit

Permalink
VST3: some tweaks to fix window resizing in Reaper on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
julianstorer committed Nov 24, 2015
1 parent f179942 commit 6fcde1e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
Expand Up @@ -640,7 +640,7 @@ class JuceVST3EditController : public Vst::EditController,

private:
//==============================================================================
class ContentWrapperComponent : public juce::Component
class ContentWrapperComponent : public juce::Component
{
public:
ContentWrapperComponent (JuceVST3Editor& editor, AudioProcessor& plugin)
Expand Down Expand Up @@ -692,11 +692,12 @@ class JuceVST3EditController : public Vst::EditController,
{
const int w = pluginEditor->getWidth();
const int h = pluginEditor->getHeight();
const PluginHostType host (getHostType());

#if JUCE_WINDOWS
setSize (w, h);
#else
if (owner.macHostWindow != nullptr && ! getHostType().isWavelab())
if (owner.macHostWindow != nullptr && ! (host.isWavelab() || host.isReaper()))
juce::setNativeHostWindowSizeVST (owner.macHostWindow, this, w, h, owner.isNSView);
#endif

Expand All @@ -705,7 +706,11 @@ class JuceVST3EditController : public Vst::EditController,
ViewRect newSize (0, 0, w, h);
owner.plugFrame->resizeView (&owner, &newSize);

if (getHostType().isWavelab())
#if JUCE_MAC
if (host.isWavelab() || host.isReaper())
#else
if (host.isWavelab())
#endif
setBounds (0, 0, w, h);
}
}
Expand Down Expand Up @@ -1575,7 +1580,7 @@ class JuceVST3Component : public Vst::IComponent,
const int numOutputChans = (data.outputs != nullptr && data.outputs[0].channelBuffers32 != nullptr) ? (int) data.outputs[0].numChannels : 0;

if ((pluginInstance->getNumInputChannels() + pluginInstance->getNumOutputChannels()) > 0
&& (numInputChans + numOutputChans) == 0)
&& (numInputChans + numOutputChans) == 0)
return kResultFalse;
}

Expand Down

0 comments on commit 6fcde1e

Please sign in to comment.