X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_menu.c;h=36b24ce63bbca63d4b61981059a90dd19d0296cb;hb=2c12c9eb8d63cabac2d4113b4f54fdf53da8368c;hp=f302cdd6dbbca49d3472bdee24fadb3c035c6f6c;hpb=39de8f8682808d020ebc7eb7f13fe49bdc07406a;p=freeglut diff --git a/src/fg_menu.c b/src/fg_menu.c index f302cdd..36b24ce 100644 --- a/src/fg_menu.c +++ b/src/fg_menu.c @@ -1,5 +1,5 @@ /* - * freeglut_menu.c + * fg_menu.c * * Pull-down menu creation and handling. * @@ -65,7 +65,7 @@ * These variables are for rendering the freeglut menu items. * * The choices are fore- and background, with and without h for Highlighting. - * Old GLUT appeared to be system-dependant for its colors (sigh) so we are + * Old GLUT appeared to be system-dependent for its colors (sigh) so we are * too. These variables should be stuffed into global state and initialized * via the glutInit*() system. */ @@ -207,7 +207,7 @@ static GLboolean fghCheckMenuStatus( SFG_Menu* menu ) if( menuEntry != menu->ActiveEntry ) { - menu->Window->State.Redisplay = GL_TRUE; + menu->Window->State.WorkMask |= GLUT_DISPLAY_WORK; if( menu->ActiveEntry ) menu->ActiveEntry->IsActive = GL_FALSE; } @@ -277,7 +277,7 @@ static GLboolean fghCheckMenuStatus( SFG_Menu* menu ) ( !menu->ActiveEntry->SubMenu || !menu->ActiveEntry->SubMenu->IsActive ) ) { - menu->Window->State.Redisplay = GL_TRUE; + menu->Window->State.WorkMask |= GLUT_DISPLAY_WORK; menu->ActiveEntry->IsActive = GL_FALSE; menu->ActiveEntry = NULL; } @@ -607,7 +607,7 @@ GLboolean fgCheckActiveMenu ( SFG_Window *window, int button, GLboolean pressed, fgSetWindow( parent_window ); fgStructure.CurrentMenu = active_menu; - /* Deactivate menu and then call callback (we don't want menu to stay in view while callback is executing) */ + /* Deactivate menu and then call callback (we don't want menu to stay in view while callback is executing, and user should be able to change menus in callback) */ fgDeactivateMenu( parent_window ); active_menu->Callback( active_entry->ID ); @@ -782,7 +782,7 @@ void fghCalculateMenuBoxSize( void ) */ int FGAPIENTRY glutCreateMenu( FGCBMenu callback ) { - /* The menu object creation code resides in freeglut_structure.c */ + /* The menu object creation code resides in fg_structure.c */ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenu" ); if (fgState.ActiveMenus) fgError("Menu manipulation not allowed while menus in use."); @@ -804,7 +804,7 @@ void FGAPIENTRY glutDestroyMenu( int menuID ) if (fgState.ActiveMenus) fgError("Menu manipulation not allowed while menus in use."); - /* The menu object destruction code resides in freeglut_structure.c */ + /* The menu object destruction code resides in fg_structure.c */ fgDestroyMenu( menu ); }