> On 03.11.2011 17:22, David wrote: > 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();
I need a popup window that is there for show only, because in the same thread I need to do a bunch of work that will take a long time and can't sit in message loop. So I create a window, put text on it, show the window, but it won't show without flush or wait, but wait(0) does the same as one flush no matter how many times called (window shows but no text). Basicaly, show a pop up, then go do something for a long time that won't call wait, then when done, close the popup, then maybe do something for a while before getting back to the main loop. On close, the window goes but the background doesn't get drawn when using flush or wait(0). Fl_Window *win=new Fl_Window(x,y,w,h); Fl_Box *box=new Fl_Box(x,y,w,h,text); win->show(); (need it to show here without waiting too long) do lots of stuff that takes a long time and can't call wait() win->hide(); (need it to go away here without waiting too long) delete win; (maybe do other stuff without the wait()). _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

