fix VST GUI swallowing for windows
[ardour.git] / gtk2_ardour / plugin_ui.cc
index 28ef9b12972a870e4ddca1a7febbbbfc401076ac..190fd2ad969bddb5f6b1a0c253fc86aa8ac0fbe0 100644 (file)
@@ -159,6 +159,9 @@ PluginUIWindow::PluginUIWindow (
 
 PluginUIWindow::~PluginUIWindow ()
 {
+#ifndef NDEBUG
+       cerr << "PluginWindow deleted for " << this << endl;
+#endif
        delete _pluginui;
 }
 
@@ -224,7 +227,7 @@ PluginUIWindow::create_windows_vst_editor(boost::shared_ptr<PluginInsert>)
                      << endmsg;
                throw failed_constructor ();
        } else {
-               WindowsVSTPluginUI* vpu = new WindowsVSTPluginUI (insert, vp);
+               WindowsVSTPluginUI* vpu = new WindowsVSTPluginUI (insert, vp, GTK_WIDGET(this->gobj()));
 
                _pluginui = vpu;
                _pluginui->KeyboardFocused.connect (sigc::mem_fun (*this, &PluginUIWindow::keyboard_focused));
@@ -403,8 +406,6 @@ PluginUIWindow::plugin_going_away ()
        }
 
        death_connection.disconnect ();
-
-       delete_when_idle (this);
 }
 
 PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)