changing the start (position) of a marker with a scene change needs to update the...
[ardour.git] / gtk2_ardour / vst_plugin_ui.cc
index 35f59a71f5d6fee7ab0e2cb355f629e082ed16cc..6ed5b9af03241932bb41fcda45440c4f58bddeee 100644 (file)
 
 */
 
+#include <gtkmm.h>
 #include "ardour/vst_plugin.h"
 #include "ardour/vst_types.h"
 #include "vst_plugin_ui.h"
+
+#ifdef PLATFORM_WINDOWS
+#include <gdk/gdkwin32.h>
+#elif defined __APPLE__
+// TODO
+#else
 #include <gdk/gdkx.h>
+#endif
 
 VSTPluginUI::VSTPluginUI (boost::shared_ptr<ARDOUR::PluginInsert> insert, boost::shared_ptr<ARDOUR::VSTPlugin> plugin)
        : PlugUIBase (insert)
@@ -41,6 +49,7 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<ARDOUR::PluginInsert> insert, boost:
        pack_start (*box, false, false);
 #ifdef GDK_WINDOWING_X11
        pack_start (_socket, true, true);
+       _socket.set_border_width (0);
 #endif
 }
 
@@ -79,6 +88,9 @@ VSTPluginUI::package (Gtk::Window& win)
 
        /* This assumes that the window's owner understands the XEmbed protocol */
        _socket.add_id (get_XID ());
+       _socket.set_size_request(
+                       _vst->state()->width + _vst->state()->hoffset,
+                       _vst->state()->height + _vst->state()->voffset);
 #endif
        
        return 0;
@@ -139,4 +151,3 @@ VSTPluginUI::configure_handler (GdkEventConfigure*)
 #endif
        return false;
 }
-