On Tue, Aug 17, 2010 at 9:11 AM, Dov Grobgeld <dov.grobg...@gmail.com> wrote: > Sorry, I still don't get it. In my scenario there is initially is no > external request of a region that should be drawn. The only source of what > should be drawn, including what areas should be exposed, are in the draw() > routine. The challenge is to translate a set of drawing routines to a set of > invalidation areas.
This is how you described it: >Here is a description of my flow, which might e.g. be used to draw a rubber >band box: > > 1. motion event calls update() > 2. update() calls draw() in order to get regions to expose. > 3. update() calls gdk_invalidate_region() based on output from draw > 4. exposure-event callback calls draw() to carry out the drawing for each > region this is wrong. update() should just call gdk_invalidate_region(). this will cause expose to be invoked with the region passed in. the way you've described it above, your draw() method does two entirely separate tasks. _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list