> > In the end, I stuck with add_timeout(). After re-reading 
> the docs for
> > add_timeout and add_check, add_timeout seemed like the cleanest way.
> 
> Have you considered Fl::add_idle() and Fl::remove_idle(). It 
> is like a  
> 0.0 timeout without the overhead of calculating time.


Yes, we tried that (or at least, I did) but it was sub-optimal in this
case; the callback is used to pop a confirmation dialog, and whilst that
dialog is displayed, the CPU was maxed out, then went back to normal
once the dialog was closed.
I think I probably ought to have removed the idle callback before
showing the dialog, or something, rather than removing it after the
dialog returned?
In my (albeit limited) testing, the timeout and check approaches both
worked just fine (as did the idle, of course) but without maxing out the
CPU.

Cheers,
-- 
Ian


SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to