John correctly observed that the initialization {OldHeight} and

{OldWidth} in the window structure should be done for both windows
and sub-windows, and the easiest way to do this is in the
freeglut_structure.c:fgCreateWindow() code.  So, transplant one line.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@383 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-12-11 00:08:49 +00:00
parent d4f3ec79de
commit 6a3df5043c
2 changed files with 1 additions and 1 deletions

View File

@ -91,6 +91,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
* Initialize the object properties
*/
window->ID = ++fgStructure.WindowID;
window->State.OldHeight = window->State.OldWidth = -1;
fgListInit( &window->Children );
if( parent )

View File

@ -610,7 +610,6 @@ int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
parent = fgWindowByID( parentID );
freeglut_return_val_if_fail( parent != NULL, 0 );
window = fgCreateWindow( parent, "", x, y, w, h, GL_FALSE, GL_FALSE );
window->State.OldHeight = window->State.OldWidth = -1;
return window->ID;
}