VST3 (maybe AAX) resizing issues on MAC


#1

When a VST3 plugin window in Cubase gets resized, for example by the size of two (double width, double height, there is a scale option in my plugin), and the plugin rectangle goes beyond the bottom or right screen border, it seems the native window will be limited to match the screen border.
So far so good.

But now we have a big problem. The plugin still uses the non-limited width/height coordinates.
So a part of the plugin goes beyond the window, the plugin is only partially visible, even if I move it away from the border.

This must be somehow fixed.

Maybe use a 100ms timer after setNativeHostWindowSizeVST has been called, which checks the actual size of the native window, and synchronizes the internal width/height coordinates of the plugin window.

In ProTools AAX I have noticed a similar behavior.


#2

Here is an example to reconstruct the issue:

Modify the juce-plugin demo
add a button which is doubling the size of the plugin:

  void buttonClicked (Button*)  override
    {
        DBG ("Resize");
        setSize(getWidth()*2, getHeight()*2);
    };

Move the plugin window to the bottom right edge.
Press the button two times.
Try to resize the window -> now the native window and the internal size are NOT the same.


#3

Have this problem currently in pro tools/AAX, not sure what i can do to get the actual size of the native window.

The problem is, i have an internal scaling mechanism for the whole plugin, if the windows is on the bottom/right edge, and change the scaling to 2x, the plugin size will be doubled. But the native windows will be constrained by the physical screen size, after that the plugin thinks it is twice as big, but actually only the left-top area of the plugin is visible (… which hides important controls to resize the window)
Is this something which could be solved in the wrapper, is there something in the wrapper which constraints the actual windows size, or does it pro tools?