From a4c20df8f80c36d45fae8fdaac2bed379a870955 Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Sat, 21 Jul 2012 02:32:58 +0000 Subject: [PATCH 1/1] When having submenu open in one window and activating its root menu in another window, submenu didn't close and root menu's activate state wasn't reset. Fixed. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1351 7f0cb862-5218-0410-a997-914c9d46530a --- src/fg_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fg_menu.c b/src/fg_menu.c index 0e219b8..2460b1d 100644 --- a/src/fg_menu.c +++ b/src/fg_menu.c @@ -512,9 +512,9 @@ static void fghActivateMenu( SFG_Window* window, int button ) SFG_Menu* menu = window->Menu[ button ]; SFG_Window* current_window = fgStructure.CurrentWindow; - /* If the menu is already active in another window, deactivate it there */ + /* If the menu is already active in another window, deactivate it (and any submenu's) there */ if ( menu->ParentWindow ) - menu->ParentWindow->ActiveMenu = NULL ; + fgDeactivateMenu(menu->ParentWindow); /* Mark the menu as active, so that it gets displayed: */ window->ActiveMenu = menu; -- 1.7.10.4