Re: problem refreshing cairo surface
Zoltán Vörös <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On 11/13/2011 06:47 AM, Kalle Vahlman wrote:
> I don't immediately spot the error, though there is a possible race
> condition between configure_event (which is an asynchronous event by
> nature) and trying to use the context it creates in on_load(). That
> should probably give an error though.
I think your suspicion was correct. This works, although I am not sure
whether this is how it should be done:
self.DA = Preview()
self.widget('box_preview').pack_start(self.DA.da, True, True, 0)
while Gtk.events_pending():
Gtk.main_iteration()
self.draw_note(self.DA.da, self.DA.surface)
What is a bit odd, however, is that if I move the Gtk.main_iteration()
to the __init__ or the configuration function, then it doesn't work.
Anyway, I would still be interested in the "proper" way of handling this.
Cheers,
Zoltán
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo