> No, with respect, I don't think that you were told that, although it's a > tricky thing - lots of stuff happening "in parallel" so it is very > confusing and somewhat opaque. > I think that you were told that fltk would be finished with the image > file, once the calls that create the Fl_PNG_Image were done (so the png > file on the disk can be released, and at that point fltk will have a > complete version of the image in its memory) but this does *not* mean > that the image will be mapped to the display by then.
Thanks for the thoughtful & measured response, Ian. I have to admit, with what I've learned since the original post, and re-reading Mathias' initial response, I can see that it was _MY_ mis-interpretation or "reading too much into his words" that led to my own confusion about what "fltk is finished with it" actually meant. I hope I've not offended Mathias by mis-representing his well intentioned attempt to help educate me and answer my questions. > Unless you really want to stop fltk, calling sleep is seldom useful on a > desktop type OS, as they will manage scheduling by fairness (rather than > by hard priority) and so the X-server and everybody else will get a > share of the execution time whether you make your app explicitly yield > or not. So in this case, it doesn't make a great deal of sense to call > sleep. You would probably get better and more consistent results using > the FL timers - Fl::add_timeout() - to do what you need here, or > something... Agreed - use of sleep() is pretty useless - I only added it to the test code posted to illustrate the issue noted in the real application, which would be doing initialization work. The init work would be within fltk, so perhaps some of the called functions called would steal a bit of time for "background tasks" and my splash would eventually make an appearance, but then again maybe not. I will probably use some variation of the Fl::add_timeout() solution, with the expectation that my init processing will be complete before the splash timeout occurs. Even though I can't be sure WHEN my screen gets displayed, I expect if I set a reasonable timeout (e.g., 5 secs), the splash should get SOME playtime. Anyway, thanks for adding to my education. Regards Robb. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

