summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-11-28 15:13:10 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-11-28 15:13:10 +0000
commit687f0693af97e2caa7e731ef9fb4dc8c4d5e600a (patch)
tree8f3127707a586ca549dbd76f4e15d60b71a68897 /src
parentb317b6dbb02dba7fbc35568508ac320f8695aaff (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx11
1 files changed, 10 insertions, 1 deletions
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