SetResizable works for PC VST but not AU?

I’ve got a JUCE 5 plugin that’s a VST on the PC and an AU (v2) on Mac. In the PluginEditor.cpp constructor, I’ve added these lines:

setResizable(true, true);
setResizeLimits(600, 450, 3840, 2160);

In the PC VST, a resize indicator shows up in the corner, and I can freely resize the plugin, which is great! However, the AU version, in GarageBand and Logic, doesn’t show the resize indicator and can’t be resized. The cursor changes to resize cursors along the border of the plugin window, but nothing happens if you try to resize it.

Does the corner resizer not work in an AU? Is there something I have to implement to get resizing working in GarageBand?


Turns out it doesn’t like those values, 3840 and 2160. If I go with smaller values, this works.

you should use

auto bounds = Desktop::getInstance()
             .getDisplayContaining( this->getBounds().getCentre() )
setResizeLimits( 600, 450, bounds.getWidth(), bounds.getHeight() );
1 Like

Unfortunately that’s not working. You were missing .getDisplays() after getInstance(), but the window isn’t showing up resizable with that code.

It does work if I do this:

setResizeLimits( 600, 450, bounds.getWidth() - 100, bounds.getHeight() - 100);

However, subtracting only 50 from each value does not work. Weird!


…and that code is only working on my laptop (1280x800) – on an HD display, even subtracting 100 isn’t working.

I figured this out.

For the record, the setSize() call in the editor’s constructor needs to come AFTER you call setResizable(). Otherwise, the corner indicator might not show up in the AU. Once I moved setSize() to be the very last thing that happens, everything works.