Fix Fl::add_timeout() in draw() under Linux (STR 3188)

Timeouts queued during Fl_Widget::draw() - called by Fl::flush() -
would not be serviced unless other events were processed. For
Details see STR 3188.
This commit is contained in:
Albrecht Schlosser 2019-12-09 17:50:15 +01:00
parent 02db5d4799
commit 770663920e
2 changed files with 20 additions and 0 deletions

16
CHANGES
View File

@ -1,3 +1,19 @@
CHANGES IN FLTK 1.3.6 RELEASED: ??? ?? 202?
Bug fixes and other improvements
[Note to devs: list created with `git shortlog release-1.3.5..`]
Albrecht Schlosser (1):
Fix Fl::add_timeout() in draw() under Linux (STR 3188)
ManoloFLTK (4):
X11: add support for copy+paste of image within one app
Windows: add bitmap version of graphics when copying to clipboard
Fix use of Xrender extension with old, 16-bit framebuffers.
Fix for Fl_Native_File_Chooser under macOS 10.15 Catalina and in BROWSE_SAVE_FILE mode
CHANGES IN FLTK 1.3.5 RELEASED: Mar 03 2019
Bug fixes and other improvements

View File

@ -620,6 +620,10 @@ double Fl::wait(double time_to_wait) {
flush();
if (idle && !in_idle) // 'idle' may have been set within flush()
time_to_wait = 0.0;
else if (first_timeout && first_timeout->time < time_to_wait) {
// another timeout may have been queued within flush(), see STR #3188
time_to_wait = first_timeout->time >= 0.0 ? first_timeout->time : 0.0;
}
return fl_wait(time_to_wait);
}
#endif