Set the current window before calling the window closure callback.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@63 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
d9ea879e8c
commit
c6ce746e65
@ -254,7 +254,12 @@ void fgDestroyWindow( SFG_Window* window, GLboolean needToClose )
|
|||||||
* If the programmer defined a destroy callback, call it
|
* If the programmer defined a destroy callback, call it
|
||||||
*/
|
*/
|
||||||
if ( window->Callbacks.Destroy != NULL )
|
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
|
||||||
|
Reference in New Issue
Block a user