VST3 window visibility handling

Found an issue where, when hosting a VST3 plugin, and you wish to hide its editor, it stays pinned.
This seems to be down to what happens after setVisible() is called, and the VST3PluginFormat class calls its own componentMovedOrResized. In this method, the window visibility is set according to the return from isVisible(). Change this to isShowing(), and you’ll find the issue disappears.

SetWindowPos (pluginHandle, 0,
              pos.x, pos.y, rect.getWidth(), rect.getHeight(),
              isShowing() ? SWP_SHOWWINDOW : SWP_HIDEWINDOW);
1 Like