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:
parent
d4f3ec79de
commit
6a3df5043c
@ -91,6 +91,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
|
|||||||
* Initialize the object properties
|
* Initialize the object properties
|
||||||
*/
|
*/
|
||||||
window->ID = ++fgStructure.WindowID;
|
window->ID = ++fgStructure.WindowID;
|
||||||
|
window->State.OldHeight = window->State.OldWidth = -1;
|
||||||
|
|
||||||
fgListInit( &window->Children );
|
fgListInit( &window->Children );
|
||||||
if( parent )
|
if( parent )
|
||||||
|
@ -610,7 +610,6 @@ int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
|
|||||||
parent = fgWindowByID( parentID );
|
parent = fgWindowByID( parentID );
|
||||||
freeglut_return_val_if_fail( parent != NULL, 0 );
|
freeglut_return_val_if_fail( parent != NULL, 0 );
|
||||||
window = fgCreateWindow( parent, "", x, y, w, h, GL_FALSE, GL_FALSE );
|
window = fgCreateWindow( parent, "", x, y, w, h, GL_FALSE, GL_FALSE );
|
||||||
window->State.OldHeight = window->State.OldWidth = -1;
|
|
||||||
return window->ID;
|
return window->ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user