Fixed a bug in the menu callback behavior. Menus were not setting the

current window correctly.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@214 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-10-08 00:24:33 +00:00
parent 8436dd7205
commit de5aadf9b5

View File

@ -865,7 +865,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
SFG_Window *save_window = fgStructure.Window ; SFG_Window *save_window = fgStructure.Window ;
SFG_Menu *save_menu = fgStructure.Menu ; SFG_Menu *save_menu = fgStructure.Menu ;
SFG_Window *parent_window = window->ActiveMenu->ParentWindow ; SFG_Window *parent_window = window->ActiveMenu->ParentWindow ;
fgSetWindow ( window ) ; fgSetWindow ( parent_window ) ;
fgStructure.Menu = window->ActiveMenu ; fgStructure.Menu = window->ActiveMenu ;
/* Execute the menu callback */ /* Execute the menu callback */
@ -1643,7 +1643,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
SFG_Window *save_window = fgStructure.Window ; SFG_Window *save_window = fgStructure.Window ;
SFG_Menu *save_menu = fgStructure.Menu ; SFG_Menu *save_menu = fgStructure.Menu ;
SFG_Window *parent_window = window->ActiveMenu->ParentWindow ; SFG_Window *parent_window = window->ActiveMenu->ParentWindow ;
fgSetWindow ( window ) ; fgSetWindow ( parent_window ) ;
fgStructure.Menu = window->ActiveMenu ; fgStructure.Menu = window->ActiveMenu ;
/* Execute the menu callback */ /* Execute the menu callback */