Fixed a bug in the menu callback behavior. Menus were not setting the
authorRichard Rauch <rkr@olib.org>
Wed, 8 Oct 2003 00:24:33 +0000 (00:24 +0000)
committerRichard Rauch <rkr@olib.org>
Wed, 8 Oct 2003 00:24:33 +0000 (00:24 +0000)
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

index c6eaa64..cc2aca0 100644 (file)
@@ -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 */