summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
index 0e1864291..75467b71b 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -480,6 +480,10 @@ double Fl_X11_Screen_Driver::wait(double time_to_wait)
Fl::flush();
if (Fl::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 this->poll_or_select_with_delay(time_to_wait);
}
}