|
|
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: https://www.fltk.org/str.php?L3532
Version: 1.3.5
A timeout set by Fl::add_timeout elapses too early, if a previous timeout
was processed with delay.
The reason is that add_timeout() internally uses repeat_timeout() to add
the new timeout but repeat_timeout() adds missed_timeout_by to the selected
timeout, which is wrong in case of add_timeout(). If the last timeout was
processed with delay, the timeout set by add_timeout() will elapse too
early.
Changing add_timeout in Fl.cxx as follows fixes the issue:
void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void *argp) {
elapse_timeouts();
double miss=missed_timeout_by;
missed_timeout_by=0;
repeat_timeout(time, cb, argp);
missed_timeout_by=miss;
}
Link: https://www.fltk.org/str.php?L3532
Version: 1.3.5
[ Direct Link to Message ] | |
|
| |