projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added glutGetProcAddress() and GLUT_FPS
[freeglut]
/
freeglut-1.3
/
freeglut_structure.c
diff --git
a/freeglut-1.3/freeglut_structure.c
b/freeglut-1.3/freeglut_structure.c
index
2da3e1f
..
2c26259
100644
(file)
--- a/
freeglut-1.3/freeglut_structure.c
+++ b/
freeglut-1.3/freeglut_structure.c
@@
-209,7
+209,7
@@
void fgAddToWindowDestroyList ( SFG_Window* window, GLboolean needToClose )
void fgCloseWindows ()
{
SFG_WindowList *window_ptr = WindowsToDestroy ;
void fgCloseWindows ()
{
SFG_WindowList *window_ptr = WindowsToDestroy ;
- WindowsToDestroy = (SFG_WindowList*)NULL ; // In case the destroy callbacks cause more windows to be closed
+ WindowsToDestroy = (SFG_WindowList*)NULL ; /* In case the destroy callbacks cause more windows to be closed */
while ( window_ptr )
{
while ( window_ptr )
{
@@
-254,7
+254,12
@@
void fgDestroyWindow( SFG_Window* window, GLboolean needToClose )
* If the programmer defined a destroy callback, call it
*/
if ( window->Callbacks.Destroy != NULL )
* If the programmer defined a destroy callback, call it
*/
if ( window->Callbacks.Destroy != NULL )
+ {
+ SFG_Window *activeWindow = fgStructure.Window ;
+ fgStructure.Window = window ;
window->Callbacks.Destroy () ;
window->Callbacks.Destroy () ;
+ fgStructure.Window = activeWindow ;
+ }
/*
* Now we should remove the reference to this window from its parent
/*
* Now we should remove the reference to this window from its parent