On 06.11.2011 07:13, David wrote:
> Okay, well, tonight I decided to check for timer functions and found them and 
> came up with the following.  The only quesiton I have is if the Stop() 
> routine loop of 4 checks is okay or if slow X server/client communcations 
> would matter?  Wouldn't it all just be sent down? maybe use Fl::flush instead?

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).
Again, RTFM:

<http://www.fltk.org/doc-1.3/classFl.html#a08d29d807ea3874b8bb16f7457f64bdc>

"Causes all the windows that need it to be redrawn and graphics forced 
out through the pipes.

This is what wait() does before looking for events.

Note: in multi-threaded applications you should only call Fl::flush() 
from the main thread. If a child thread needs to trigger a redraw event, 
it should instead call Fl::awake() to get the main thread to process the 
event queue."


Albrecht
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to