In "freeglut_main.c" on line 576, the program changes the execution
state to "stop" if there is a window closure event. There needs to be an
"else if" statement before this:
exit( 0 );
+ else if( fgState.ActionOnWindowClose == GLUT_ACTION_GLUTMAINLOOP_RETURNS )
fgState.ExecState = GLUT_EXEC_STATE_STOP;
A similar change needs to be made on line 1089 for the Windows branch.
The effect of this bug, at least under Linux, was as follows. In my
application, I have five windows which are not supposed to be closed. If
the user accidentally clicks on the "X" to close one of them, I regenerate
the window in the destruction callback. With the bug, the "deinitialize"
function would start closing windows and the destruction callbacks would
re-create them ... ad infinitum. It was not pretty.
John F. Fay
On Fri, Apr 23, 2004 at 04:42:43PM -0500, Fay John F Contr AAC/WMG wrote:
> In "freeglut_main.c" on line 576, the program changes the execution
> state to "stop" if there is a window closure event. There needs to be an
> "else if" statement before this:
> fgDeinitialize( );
> exit( 0 );
> + else if( fgState.ActionOnWindowClose =3D=3D GLUT_ACTION_GLUTMAINLOOP_RE=
> fgState.ExecState =3D GLUT_EXEC_STATE_STOP;
I assume then, that your window has set GLUT_ACTION_GLUTMAINLOOP_RETURNS?
"I probably don't know what I'm talking about." http://www.olib.org/~rkr/
Get latest updates about Open Source Projects, Conferences and News.