mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
VST3: work-around endless/recursive resize requests
Some plugins correct their own size when resized which can lead to endlessly growing GUIs. In particular this issue exists if Ardour's plugin-toolbar forces a plugin to grow in size to fill the allocated space. While the plugin aims for fixed aspect-ratio. This will need a proper solution involving VST's checkSizeConstraint, however GTK+2 does not have an appropriate API...
This commit is contained in:
parent
5dc3f2a320
commit
67b1481c12
6 changed files with 18 additions and 16 deletions
|
|
@ -25,6 +25,8 @@
|
|||
#include <glibmm/main.h>
|
||||
#include <gtkmm/socket.h>
|
||||
|
||||
#include "pbd/unwind.h"
|
||||
|
||||
#include "ardour/plugin_insert.h"
|
||||
#include "ardour/vst3_plugin.h"
|
||||
|
||||
|
|
@ -212,6 +214,8 @@ VST3X11PluginUI::view_size_allocate (Gtk::Allocation& allocation)
|
|||
if (!view) {
|
||||
return;
|
||||
}
|
||||
PBD::Unwinder<bool> uw (_resize_in_progress, true);
|
||||
|
||||
ViewRect rect;
|
||||
if (view->getSize (&rect) == kResultOk) {
|
||||
rect.right = rect.left + allocation.get_width ();
|
||||
|
|
@ -234,7 +238,7 @@ VST3X11PluginUI::resize_callback (int width, int height)
|
|||
{
|
||||
// printf ("VST3X11PluginUI::resize_callback %d x %d\n", width, height);
|
||||
IPlugView* view = _vst3->view ();
|
||||
if (!view) {
|
||||
if (!view || _resize_in_progress) {
|
||||
return;
|
||||
}
|
||||
if (view->canResize() == kResultTrue) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue