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:
parent
0a23d7fe6e
commit
35a3e7cc16
@ -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) {
|
void Fl_X11_Screen_Driver::add_timeout(double time, Fl_Timeout_Handler cb, void *argp) {
|
||||||
elapse_timeouts();
|
elapse_timeouts();
|
||||||
|
missed_timeout_by = 0;
|
||||||
repeat_timeout(time, cb, argp);
|
repeat_timeout(time, cb, argp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user