From 7f224f1db5d7de7d2bce31c763d5eb8731fda6e7 Mon Sep 17 00:00:00 2001 From: Richard Rauch Date: Wed, 8 Oct 2003 00:24:33 +0000 Subject: [PATCH] Fixed a bug in the menu callback behavior. Menus were not setting the current window correctly. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@214 7f0cb862-5218-0410-a997-914c9d46530a --- src/freeglut_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freeglut_main.c b/src/freeglut_main.c index c6eaa64..cc2aca0 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -865,7 +865,7 @@ void FGAPIENTRY glutMainLoopEvent( void ) SFG_Window *save_window = fgStructure.Window ; SFG_Menu *save_menu = fgStructure.Menu ; SFG_Window *parent_window = window->ActiveMenu->ParentWindow ; - fgSetWindow ( window ) ; + fgSetWindow ( parent_window ) ; fgStructure.Menu = window->ActiveMenu ; /* 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_Menu *save_menu = fgStructure.Menu ; SFG_Window *parent_window = window->ActiveMenu->ParentWindow ; - fgSetWindow ( window ) ; + fgSetWindow ( parent_window ) ; fgStructure.Menu = window->ActiveMenu ; /* Execute the menu callback */ -- 1.7.10.4