[cairo] Some questions...

Kalle Vahlman kalle.vahlman at gmail.com
Sun Jul 15 01:19:58 PDT 2007

2007/7/14, Loïc Faure-Lacroix <loicfl at gmail.com>:
> I'm working with gtkmm + cairomm
> I don't know if its a bug or not.

No bugs here, see below.

> I do override the expose-event function of my window.
> But now anything added over my window isn't rendered except drawing area
> that their on_expose_event is overrided too.
> it's like if the window was rendering over everything.

No, it's rendering below everything. It's just that you are not
telling the children of the window to draw themselves (the drawing
area has it's own Gdk window so I guess that's why it is drawn).

You need to use Gtk::Container::propagate_expose() for each child to
make them draw themselves.


Since Windows only have one child, addin this line should suffice:

  propagate_expose(get_child(), event);

Note that you'll want to do this after you have drawn the window,
otherwise you'll likely be drawing over the children.

Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi

More information about the cairo mailing list