Fix Fl::add_timeout() under Linux (STR 3516)

See comment 14 (excerpt):

"The current implementation basically handles add_timeout() the same
way as repeat_timeout(), i.e. add_timeout() *calls* repeat_timeout().
However, repeat_timeout() intentionally *corrects* the timeout value
by the value found in the global variable 'missed_timeout_by' which
is set when the timer expires, directly before the timer callback
is called. This variable is never reset."

This commit resets the variable as necessary in Fl::add_timeout().
This commit is contained in:
Albrecht Schlosser 2019-12-26 17:19:05 +01:00
parent 0a23d7fe6e
commit 35a3e7cc16

View File

@ -635,6 +635,7 @@ const char *Fl_X11_Screen_Driver::get_system_scheme()
void Fl_X11_Screen_Driver::add_timeout(double time, Fl_Timeout_Handler cb, void *argp) {
elapse_timeouts();
missed_timeout_by = 0;
repeat_timeout(time, cb, argp);
}