From 7dc80d17b0a29dd5c9b6f7f2763c51af9e5fe96d Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 11 Jul 2002 01:10:15 +0000 Subject: [PATCH] MacOS: wait(0) would not handle all pending events. The OpenGL demos were showing a significant delay in handling UI events. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2502 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 1 + src/Fl.cxx | 5 ++--- src/Fl_mac.cxx | 8 ++++---- test/cube.cxx | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 7dc447599..b2c5ca822 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.0 + - MacOS: wait(0) would not handle all pending events - Added new makeinclude file for MingW using GCC 3.1.x. - Fl_Choice::value(n) didn't range check "n". - The MingW and OS/2 makeinclude files didn't have the diff --git a/src/Fl.cxx b/src/Fl.cxx index 265503ad3..ff06ffc7d 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.41 2002/07/08 19:19:07 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.42 2002/07/11 01:10:15 matthiaswm Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -367,7 +367,6 @@ void Fl::flush() { if ( port ) { QDFlushPortBuffer( port, 0 ); - //printf("DBG: Fl::flush\n"); } #else if (fl_display) XFlush(fl_display); @@ -949,5 +948,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.41 2002/07/08 19:19:07 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.42 2002/07/11 01:10:15 matthiaswm Exp $". // diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index 34c31fc0e..7ecac1410 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_mac.cxx,v 1.1.2.29 2002/06/28 00:28:09 matthiaswm Exp $" +// "$Id: Fl_mac.cxx,v 1.1.2.30 2002/07/11 01:10:15 matthiaswm Exp $" // // MacOS specific code for the Fast Light Tool Kit (FLTK). // @@ -450,7 +450,7 @@ static void breakMacEventLoop() /** - * This function iss the central event handler. + * This function is the central event handler. * It reads events from the event queue using the given maximum time * Funny enough, it returns the same time that it got as the argument. */ @@ -538,7 +538,7 @@ static double do_queued_events( double time = 0.0 ) { EventRef breakEvent; CreateEvent( 0, kEventClassFLTK, kEventFLTKBreakLoop, 0, kEventAttributeUserEvent, &breakEvent ); - PostEventToQueue( GetCurrentEventQueue(), breakEvent, kEventPriorityStandard ); + PostEventToQueue( GetCurrentEventQueue(), breakEvent, kEventPriorityLow ); RunApplicationEventLoop(); ReleaseEvent( breakEvent ); if ( dataready_tid != 0 ) @@ -1683,6 +1683,6 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) { // -// End of "$Id: Fl_mac.cxx,v 1.1.2.29 2002/06/28 00:28:09 matthiaswm Exp $". +// End of "$Id: Fl_mac.cxx,v 1.1.2.30 2002/07/11 01:10:15 matthiaswm Exp $". // diff --git a/test/cube.cxx b/test/cube.cxx index bc5d5a2be..2095f5db0 100644 --- a/test/cube.cxx +++ b/test/cube.cxx @@ -1,5 +1,5 @@ // -// "$Id: cube.cxx,v 1.4.2.5.2.3 2002/06/26 03:36:57 matthiaswm Exp $" +// "$Id: cube.cxx,v 1.4.2.5.2.4 2002/07/11 01:10:15 matthiaswm Exp $" // // Another forms test program for the Fast Light Tool Kit (FLTK). // @@ -33,6 +33,7 @@ #include #include #include +#include #if !HAVE_GL class cube_box : public Fl_Box { @@ -184,5 +185,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: cube.cxx,v 1.4.2.5.2.3 2002/06/26 03:36:57 matthiaswm Exp $". +// End of "$Id: cube.cxx,v 1.4.2.5.2.4 2002/07/11 01:10:15 matthiaswm Exp $". //