Re: forcing immediate redraw on widget
- From: Harring Figueiredo <harringf yahoo com>
- To: Gus Koppel <gtk spamkiller bytechase cx>, gtk-app-devel-list gnome org
- Subject: Re: forcing immediate redraw on widget
- Date: Tue, 27 Apr 2004 08:22:34 -0700 (PDT)
/* Process and remove all previously pending events */
while (gtk_events_pending ())
gtk_main_iteration ();
/* Verify that 0 == 0 still */
printf ("gtk_events_pending (should be 0): %d\n",
gtk_events_pending ());
/* Invalidate widget, should generate new event */
gtk_widget_queue_draw (widget_to_redraw);
/* Check whether GTK+ knows about a new event pending */
printf ("gtk_events_pending (should NOT be 0): %d\n",
gtk_events_pending ());
If especially the second result is "0" then I would suspect an erroneous
or missing implementation of gtk_widget_queue_draw () in GTK+ 1.2.
Err, I beg to differ. This is a very erroneous assumption -- The events are
assynchronous and they could happen just "in between" the call from
gtk_envents_pending and printf.. This is very likely since printf actually
causes a hardware interrupt.
Again, don't assume that the program data will be unchanged on a
assynchroneous environment (Even if it is running on a single CPU).
Harring Figureiredo
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]