GarageBand plug-in window can't be bigger than main display


it turns out that GarageBand puts the plug-in UI inside a NSView that is at most large enough to fit within the main screen of the computer, but not bigger.

If you have a plug-ins UI that grows larger than that (maybe because it’s resizable), it’s possible that some of it will lay outside of the GarageBand provided NSView, thus being clipped on the right and top side.

This is my proposed change, to be added to the viewDidMoveToWindow method for the JuceUIViewClass in the AU wrapper source:

it will resize the AudioProcessorEditor inside the EditorCompHolder in order to fit it inside the provided NSview

                Component* editorComponent = editorComp->getChildComponent (0);
                if (editorComponent != nullptr)
                    NSRect visibleRect = [(NSView*) editorComp->getWindowHandle() visibleRect];
                    const int newWidth = jmin (editorComponent->getWidth(), int (visibleRect.size.width));
                    const int newHeight = jmin (editorComponent->getHeight(), int (visibleRect.size.height));
                    editorComponent->setSize (newWidth, newHeight);


On a second thought… it’s possible that in some hosts the hosting NSView size hasn’t been correctly set yet when this code is called, thus effectively resizing the plug-in EditorComponent to some bogus size before adding it to the view… any ideas?