glutMainLoopEvent() was not closing windows properly.
authorChristopher John Purnell <cjp@lost.org.uk>
Mon, 7 Jul 2003 15:37:39 +0000 (15:37 +0000)
committerChristopher John Purnell <cjp@lost.org.uk>
Mon, 7 Jul 2003 15:37:39 +0000 (15:37 +0000)
Moved call to fgCloseWindows() from glutMainLoop() to the end of glutMainLoopEvent().

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@125 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_main.c

index 5d6cfa1..f9c78ef 100644 (file)
@@ -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 () ;
 }
 
 /*
@@ -1095,11 +1100,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
      */
     if ( fgStructure.Windows.First == NULL )