On Thu, 2007-12-06 at 06:40 -0500, Behdad Esfahbod wrote: > On Thu, 2007-12-06 at 19:08 +0800, Binary Chen wrote: > > On Thu, 2007-12-06 at 06:01 -0500, Behdad Esfahbod wrote: > > > On Thu, 2007-12-06 at 18:54 +0800, Binary Chen wrote: > > > > > > > > But without the sleep() I will also not reach gtk_main(), but > the > > > > window shows, why? What I am asking is this. > > > > > > I'm guessing that it fills the drawing buffer and forces a flush. > That > > > is, with the sleep, given enough time, you will see the same > result. > > > You just need to be patient. > > > > > How long? > > "Enough time". > > > Are you sure? > > "I'm guessing". > > > Thanks.
To be more helpful, and hopefully you understand it, in the case without the sleep, your loop is running over and over, very first. So, what may seem to you like immediate rendering of the window may actually not happen before (for example) the 1000th iteration of the loop. Now if you wait for the 1000th iteration of your loop with the sleep, you should get the same result. 1000 being just a guess. -- behdad http://behdad.org/ ...very few phenomena can pull someone out of Deep Hack Mode, with two noted exceptions: being struck by lightning, or worse, your *computer* being struck by lightning. -- Matt Welsh _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list