Fix order of idle/check processing compared to events (STR #1535)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5645 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2007-01-28 19:48:31 +00:00
parent 48a997d0ad
commit ae8675a45f
2 changed files with 13 additions and 11 deletions

View File

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.8 CHANGES IN FLTK 1.1.8
- WIN32 did check callbacks after the event processing instead of
before as documented (STR #1535)
- Fl_File_Chooser now hides the window before doing a callback - Fl_File_Chooser now hides the window before doing a callback
when the user clicks on the OK button (STR #1565) when the user clicks on the OK button (STR #1565)
- Fixed indentation of nested HTML elements (STR #1549) - Fixed indentation of nested HTML elements (STR #1549)

View File

@ -3,7 +3,7 @@
// //
// WIN32-specific code for the Fast Light Tool Kit (FLTK). // WIN32-specific code for the Fast Light Tool Kit (FLTK).
// //
// Copyright 1998-2005 by Bill Spitzak and others. // Copyright 1998-2007 by Bill Spitzak and others.
// //
// This library is free software; you can redistribute it and/or // This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public // modify it under the terms of the GNU Library General Public
@ -224,6 +224,16 @@ MSG fl_msg;
int fl_wait(double time_to_wait) { int fl_wait(double time_to_wait) {
int have_message = 0; int have_message = 0;
run_checks();
// idle processing
static char in_idle;
if (Fl::idle && !in_idle) {
in_idle = 1;
Fl::idle();
in_idle = 0;
}
#ifndef USE_ASYNC_SELECT #ifndef USE_ASYNC_SELECT
if (nfds) { if (nfds) {
// For WIN32 we need to poll for socket input FIRST, since // For WIN32 we need to poll for socket input FIRST, since
@ -291,16 +301,6 @@ int fl_wait(double time_to_wait) {
} }
Fl::flush(); Fl::flush();
// idle processing
static char in_idle;
if (Fl::idle && !in_idle) {
in_idle = 1;
Fl::idle();
in_idle = 0;
}
run_checks();
// This should return 0 if only timer events were handled: // This should return 0 if only timer events were handled:
return 1; return 1;
} }