> I have a large application whose drawing logic is based on the clock
example

>* When objects need to be redrawn they set a rectangle
>* A timer fires every so often (100ms in my case), and I call
>invalidate_rect  with the above rectangle
>* My Gtk::DrawingArea-derived class overrides on_expose_event and draws the
>objects

>This logic works impeccably (*grin*) until the CPU is under heavy load.  In
>that case, I can see the invalidate_rect calls happening but
on_expose_event
>doesn't get called until the cpu load is back to normal.  I've been banging
>my head against this for a few days now and would love some new ideas about
>how to attack the problem.

I found a function -- gdk_window_process_all_updates() -- that seems to
solve this problem.  If I call this immediately after invalidating the
rectangles, then on_expose_event always gets called even under the adverse
conditions described above.

My modified question for the list then is this:  Is this a reasonable
solution?  Can anyone see a downside to calling
gdk_window_process_all_updates?

THnaks
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to