Detecting if host provides resizable window?

Is there a way to tell if the host provides resizing for its plugin windows? If we use the corner resizer, then in Studio One it’s very hard to grab, because the host-provided window has fairly large “handles” on the sides and corners for resizing. If we don’t use that corner resizer, then there is no way to resize in Pro Tools (and likely some other hosts), because it does not give us a window with resizable border. I tried this code, but the peer is NULL (at least in Studio One):

		bool hasHostResizeHandles = false;
		ComponentPeer* pPeer = this->getPeer();
		if (pPeer != nullptr)
			hasHostResizeHandles = ((pPeer->getStyleFlags() & juce::ComponentPeer::windowIsResizable) != 0);
		this->setResizable( hasHostResizeHandles, !hasHostResizeHandles );

Oh! Can i just pass true for both parameters to setResizable(), and that will work regardless of whether the host actually provides those handles or not?

Yes, the plugin shows its own resize handle in the bottom right corner after enabling this.

1 Like