X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_structure.c;h=c5a2d734ed28f0632e053ac00346e84e11b77046;hb=34f0aa01c95a8e6843069d5b9e4b2e7a7bbe1e53;hp=1d064b68bd96461d28780bb281194a31de5bc52d;hpb=1b9a554a58e5595d9512540df60a3d681dc784a9;p=freeglut diff --git a/src/freeglut_structure.c b/src/freeglut_structure.c index 1d064b6..c5a2d73 100644 --- a/src/freeglut_structure.c +++ b/src/freeglut_structure.c @@ -79,7 +79,9 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, /* Initialize the object properties */ window->ID = ++fgStructure.WindowID; +#if TARGET_HOST_POSIX_X11 window->State.OldHeight = window->State.OldWidth = -1; +#endif fgListInit( &window->Children ); if( parent ) @@ -97,6 +99,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, window->State.IgnoreKeyRepeat = GL_FALSE; window->State.KeyRepeating = GL_FALSE; + window->State.IsFullscreen = GL_FALSE; /* * Open the window now. The fgOpenWindow() function is system @@ -113,7 +116,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, */ SFG_Menu* fgCreateMenu( FGCBMenu menuCallback ) { - int x = 100, y = 100, w = 100, h = 100; + int x = 100, y = 100, w = 1, h = 1; SFG_Window *current_window = fgStructure.CurrentWindow; /* Have the menu object created */ @@ -219,12 +222,6 @@ void fgDestroyWindow( SFG_Window* window ) fghClearCallBacks( window ); fgCloseWindow( window ); -#if TARGET_HOST_UNIX_X11 - if (window->Window.FBConfig != NULL) - { - XFree( window->Window.FBConfig ); - } -#endif free( window ); if( fgStructure.CurrentWindow == window ) fgStructure.CurrentWindow = NULL;