diff --git a/freeglut/freeglut/src/freeglut_main.c b/freeglut/freeglut/src/freeglut_main.c index 5d6cfa1..f9c78ef 100644 --- a/freeglut/freeglut/src/freeglut_main.c +++ b/freeglut/freeglut/src/freeglut_main.c @@ -1048,6 +1048,11 @@ void FGAPIENTRY glutMainLoopEvent( void ) fghDisplayAll(); } #endif + + /* + * If an event caused a window to be closed, do the actual closing here + */ + fgCloseWindows () ; } /* @@ -1094,11 +1099,6 @@ void FGAPIENTRY glutMainLoop( void ) { glutMainLoopEvent () ; - /* - * If an event caused a window to be closed, do the actual closing here - */ - fgCloseWindows () ; - /* * If there are no more windows open, stop execution */