> > calling Fl::check() four times doesn't help, since there is no > > delay between the calls. Processing messages on the X server needs > > some time (and your program shouldn't depend on how much time this > > is). So no, this doesn't work. > > > > Calling Fl::flush() instead is not a solution, since Fl::flush() > > *only* updates the GUI (calling draw() for all widgets that need it). > > I threw in an XSync(fl_display) to test but same thing, background doesn't > get redrawn, so I presume it's because fltk hasn't sent the message to the > xlib or server to draw those things. So I presume fl::check() must find some > dirty stuff that needs to be redrawn and uses xlib to send those down to the > x server, why would timing matter once it has sent everything to the server? > I presume it received an ack of sometype to know the data was sent? Wouldn't > the server just needs to update the screen? Or is it possible the xlib or x > server input queue gets full and fl::check() finishes it up once it can > receive more data? > >
I looked at fl::wait and fl_wait and it looks like why timing may matters is because fltk is waiting for the x server to send an event that tells it to redraw some area. If that is the case, then if one were to stay disciplined, could they stop the signal timer, close/delete the window, then do: while(!Fl::wait(0.0)); // wait for x server event on closed window whlie(Fl::wait(0.0)); // wait until all messages/events handled ? (maybe the second one isn't needed because moving the mouse around could cause that to wait when not needed). Also, I see X11 library has an XInitThreads, XLockDisplay and XUnlockDisplay, would those help allow FLTK to support creating windows in multiple threads under X? _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

