From d00881fbc469cbf5ee8c074792065e46417b7dcc Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 1 Jun 2005 09:17:51 +0000 Subject: Fixed WIndows line endings git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 1 + src/Fl_win32.cxx | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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_.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(); -- cgit v1.2.3