From f9f28ad12a1ca65c59bccd78d93df4e48ef8566b Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 20 Sep 2002 17:56:56 +0000 Subject: Fix MacOS X 10.2 idle handling. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/Fl.cxx') diff --git a/src/Fl.cxx b/src/Fl.cxx index fa1f3aa4e..aa01b3251 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.52 2002/08/23 15:09:49 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.53 2002/09/20 17:56:56 easysw Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -221,6 +221,7 @@ void Fl::remove_check(Fl_Timeout_Handler cb, void *argp) { void (*Fl::idle)(); // see Fl_add_idle.cxx for the add/remove functions +extern int fl_ready(); // in Fl_.cxx extern int fl_wait(double time); // in Fl_.cxx static char in_idle; @@ -255,8 +256,13 @@ double Fl::wait(double time_to_wait) { } next_check = first_check; } +// if (idle && !fl_ready()) { if (idle) { - if (!in_idle) {in_idle = 1; idle(); in_idle = 0;} + if (!in_idle) { + in_idle = 1; + idle(); + in_idle = 0; + } // the idle function may turn off idle, we can then wait: if (idle) time_to_wait = 0.0; } @@ -954,5 +960,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.52 2002/08/23 15:09:49 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.53 2002/09/20 17:56:56 easysw Exp $". // -- cgit v1.2.3