I've been trying for the last hour to make this work. The idea es Dock is a class whose base is Gtk::Window, and upon the signal_draw() being emited, the given context should be painted by CairoMM to be transparent.. Instead I see a black window. Here goes the code:
Dock::Dock() : Gtk::Window()
{
set_decorated(false);
set_default_size(200,200);
set_app_paintable(true);
signal_draw().connect(sigc::mem_fun(*this,&Dock::dibujar));
}
bool Dock::dibujar(const Cairo::RefPtr<Cairo::Context>& contexto)
{
contexto->set_source_rgba(1.0,1.0,1.0,0.0);
contexto->set_operator(Cairo::OPERATOR_SOURCE);
contexto->paint();
return false;
}
Shouldn't it be enough to make the window transparent?