SubWindow border thickness fix. Overlay changes in glutGet.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@49 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dheyse 2003-02-07 21:27:20 +00:00
parent f1c230a97b
commit 304a5d98a6

View File

@ -32,7 +32,7 @@
#define G_LOG_DOMAIN "freeglut-structure"
#include "../include/GL/freeglut.h"
#include "../include/GL/freeglut_internal.h"
#include "freeglut_internal.h"
/* -- GLOBAL EXPORTS ------------------------------------------------------- */
@ -178,6 +178,17 @@ void fgAddToWindowDestroyList ( SFG_Window* window, GLboolean needToClose )
new_list_entry->next = WindowsToDestroy ;
WindowsToDestroy = new_list_entry ;
/*
* Check if the window is the current one...
*/
if ( fgStructure.Window == window )
fgStructure.Window = NULL;
/*
* If the destroyed window has the highest window ID number, decrement the window ID number
*/
if ( window->ID == fgStructure.WindowID ) fgStructure.WindowID-- ;
/*
* Check the execution state. If this has been called from "glutDestroyWindow",
* a statement in that function will reset the "ExecState" after this function returns.
@ -197,8 +208,6 @@ void fgAddToWindowDestroyList ( SFG_Window* window, GLboolean needToClose )
*/
void fgCloseWindows ()
{
fgExecutionState ExecState = fgState.ExecState ;
SFG_WindowList *window_ptr = WindowsToDestroy ;
WindowsToDestroy = (SFG_WindowList*)NULL ; // In case the destroy callbacks cause more windows to be closed
@ -209,14 +218,12 @@ void fgCloseWindows ()
free ( window_ptr ) ;
window_ptr = next ;
if ( !window_ptr ) window_ptr = WindowsToDestroy ;
if ( !window_ptr )
{
window_ptr = WindowsToDestroy ;
WindowsToDestroy = (SFG_WindowList*)NULL ;
}
}
/*
* Since the "fgDestroyWindow" function could easily have set the "ExecState" to stop,
* let's set it back to what it was.
*/
fgState.ExecState = ExecState ;
}
/*
@ -264,12 +271,6 @@ void fgDestroyWindow( SFG_Window* window, GLboolean needToClose )
if( needToClose == TRUE )
fgCloseWindow( window );
/*
* Check if the window is the current one...
*/
if( fgStructure.Window == window )
fgStructure.Window = NULL;
/*
* Finally, we can delete the window's object. It hopefully does
* have everything inside it freed and we do not have to care...