From bb5b134be6cd4c781a8551a0c7ac9d00695720a7 Mon Sep 17 00:00:00 2001 From: Richard Rauch Date: Thu, 11 Dec 2003 00:08:49 +0000 Subject: [PATCH] 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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@383 7f0cb862-5218-0410-a997-914c9d46530a --- src/freeglut_structure.c | 1 + src/freeglut_window.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freeglut_structure.c b/src/freeglut_structure.c index 583f744..6aa02fd 100644 --- a/src/freeglut_structure.c +++ b/src/freeglut_structure.c @@ -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 ) diff --git a/src/freeglut_window.c b/src/freeglut_window.c index 743b94f..07422f7 100644 --- a/src/freeglut_window.c +++ b/src/freeglut_window.c @@ -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; } -- 1.7.10.4