> On 03.11.2011 18:24, David wrote: > >> > >> 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()). > >> > >> > > > > I got it good enough .. I do a loop of 10 calling fl::wait(0.001) after the > > show and hide and it works. > > Warning: that's not a proper solution. It is likely to fail if you > use it with a remote X server that needs more time to transmit > two or three messages over the net. Besides that, your GUI will > not be responsive to user actions during your long-running work.
I was trying to find out some basics about X. I see an XFlush exists that supposed to send all XLib queued message all at once. Wouldn't that do it, or are the messages queued up by fltk?? This is probably the last thing I need to work out. What was the reason we can't start a thread and run fltk in it? Is it in the X issue or in fltk design issue? If I could at least start a thread that does nothing but run do a wait(.5) loop and exited when signal is detected from main thread for it to end. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

