X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_structure.c;h=0824a3402fc5941371c8b2d27deacf9cb7024741;hb=2e8c8e1910a0f5a18c6108174bad31f13af38165;hp=2871e320149dc643880ce13b90c955acb9be40b7;hpb=074fe7a4ceb20811af83f735d5db74d69d11442c;p=freeglut diff --git a/src/freeglut_structure.c b/src/freeglut_structure.c index 2871e32..0824a34 100644 --- a/src/freeglut_structure.c +++ b/src/freeglut_structure.c @@ -69,7 +69,8 @@ void fgClearCallBacks( SFG_Window *window ) * If parent is set to NULL, the window created will be a topmost one. */ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, - int x, int y, int w, int h, GLboolean gameMode ) + int x, int y, int w, int h, + GLboolean gameMode, GLboolean isMenu ) { /* * Have the window object created @@ -104,9 +105,8 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, * Set the default mouse cursor and reset the modifiers value */ window->State.Cursor = GLUT_CURSOR_INHERIT; - window->State.Modifiers = 0xffffffff; - window->IsMenu = fgState.BuildingAMenu ; + window->IsMenu = isMenu; /* * Open the window now. The fgOpenWindow() function is system @@ -142,22 +142,13 @@ SFG_Menu* fgCreateMenu( FGCBMenu menuCallback ) menu->ParentWindow = fgStructure.Window; /* - * Create a window for the menu to reside in. Set the - * global variable BuildingAMenu to true so we can ensure - * it is created without decorations. + * Create a window for the menu to reside in. */ - fgState.BuildingAMenu = GL_TRUE; - fgCreateWindow( NULL, NULL, x, y, w, h, GL_FALSE ); + fgCreateWindow( NULL, NULL, x, y, w, h, GL_FALSE, GL_TRUE ); menu->Window = fgStructure.Window; glutDisplayFunc( fgDisplayMenu ); - /* - * While BuildingAMenu is true, all windows built have no decorations. - * That's not a good default behavior, so let's set it false again. - */ - fgState.BuildingAMenu = GL_FALSE; - glutHideWindow( ); /* Hide the window for now */ fgSetWindow( current_window );