On 03.11.2011 17:22, David wrote: > So I want a popup window, I have a window created, text placed on it via > Fl_Box. but using Fl::wait(0) only shows the window and no text, in a loop, > same thing, if I change it to one second, then same thing if just once, but > if put in loop then it shows text too. Then it however wait's because the > test loop is up to 10, so dealys 8 seconds. Likewise, same on close after > calling to hide the window, using wait(0) is a problem, have to use 1 or > more. What's up with that?
Difficult to say from your description, please provide an example code, so that we can help you better. You should probably use Fl::wait() (without an argument, or with 0), and you MUST use a loop. A good example to see how to terminate the loop is in src/fl_ask.cxx, line #244 (FLTK 1.3, svn): while (message_form->shown()) Fl::wait(); So this loop terminates when the user closes the popup window, and that is probably what you want. > Also, in looking at the function I see: > > timeval t; > t.tv_sec = int(time_to_wait); > t.tv_usec = int(1000000 * (time_to_wait-t.tv_sec)); > > but wouldn't t.tv_usec always be zero. Not (always), if time_to_wait is a floating point value. Albrecht _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk