amend ab3889ff: portaudio backend uses a vector for connections
[ardour.git] / libs / canvas / widget.cc
index db43a68119800e9d6ae8f1a9fda0b50795eb64ca..0f49554a42448738e1db828e350eb77e71b40182 100644 (file)
@@ -24,7 +24,6 @@
 #include "canvas/canvas.h"
 #include "canvas/widget.h"
 #include "canvas/debug.h"
-#include "canvas/utils.h"
 
 using namespace std;
 using namespace ArdourCanvas;
@@ -104,11 +103,23 @@ Widget::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
        //context->rectangle (draw.x0, draw.y0, draw.width(), draw.height());
        //context->clip ();
 
-       _widget.render (context->cobj(), &crect);
+       _widget.render (context, &crect);
 
        context->restore ();
 }
 
+void
+Widget::size_allocate (Rect const & r)
+{
+       Item::size_allocate (r);
+       Gtk::Allocation alloc;
+       alloc.set_x (0);
+       alloc.set_y (0);
+       alloc.set_width (r.width());
+       alloc.set_height (r.height());
+       _widget.size_allocate (alloc);
+}
+
 void
 Widget::compute_bounding_box () const
 {