From 687f0693af97e2caa7e731ef9fb4dc8c4d5e600a Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 28 Nov 2005 15:13:10 +0000 Subject: [PATCH] STR ##1081, 1083, 1084: in a previous change that improved timer behaviour, the idle management was accidentaly removed from the code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Fl.cxx b/src/Fl.cxx index 502f1d7ad..d999b0712 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -366,9 +366,9 @@ static void run_checks() next_check = first_check; } } +#endif // !__APPLE__ static char in_idle; -#endif // !__APPLE__ //////////////////////////////////////////////////////////////// // wait/run/check/ready: @@ -389,6 +389,15 @@ double Fl::wait(double time_to_wait) { #elif defined(__APPLE__) flush(); + if (idle) { + 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; + } return fl_wait(time_to_wait); #else