summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-06-01 09:17:51 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-06-01 09:17:51 +0000
commitd00881fbc469cbf5ee8c074792065e46417b7dcc (patch)
treea66e2d03924560ef136033d244ccbe8e614e96c2 /src
parentdf32d2a9b8de1b0fe7452c1c164d5c49ed18c341 (diff)
Fixed WIndows line endings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx1
-rw-r--r--src/Fl_win32.cxx7
2 files changed, 7 insertions, 1 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index a672b5e14..a708f2ffb 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -238,6 +238,7 @@ extern int fl_wait(double time); // in Fl_<platform>.cxx
static char in_idle;
double Fl::wait(double time_to_wait) {
+ // delete all widgets that were listed during callbacks
do_widget_deletion();
if (first_timeout) {
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 5ca8abf79..1268732c5 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -273,7 +273,12 @@ int fl_wait(double time_to_wait) {
KillTimer(NULL, timerid);
}
} else {
- have_message = GetMessage(&fl_msg, NULL, 0, 0);
+ // make sure that we don't lock up if there are no more windows
+ // that could receive messages, but still handle pending messages.
+ if (!Fl_X::first)
+ have_message = PeekMessage(&fl_msg, NULL, 0, 0, PM_REMOVE);
+ else
+ have_message = GetMessage(&fl_msg, NULL, 0, 0);
}
fl_lock_function();