From 4cef95b542c40115322f6dce96645fc62addd4a1 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Wed, 7 May 2014 22:25:16 +0000 Subject: [PATCH] [User32] - Fixed more wine tests. WM_UNINITMENUPOPUP is called before destroying pop up menu window. svn path=/trunk/; revision=63183 --- reactos/win32ss/user/user32/windows/menu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/reactos/win32ss/user/user32/windows/menu.c b/reactos/win32ss/user/user32/windows/menu.c index f1ef54089da..13d8bed17e5 100644 --- a/reactos/win32ss/user/user32/windows/menu.c +++ b/reactos/win32ss/user/user32/windows/menu.c @@ -2944,13 +2944,18 @@ MenuHideSubPopups(HWND WndOwner, PROSMENUINFO MenuInfo, { MenuHideSubPopups(WndOwner, &SubMenuInfo, FALSE, wFlags); MenuSelectItem(WndOwner, &SubMenuInfo, NO_SELECTED_ITEM, SendMenuSelect, NULL); - DestroyWindow(SubMenuInfo.Wnd); - SubMenuInfo.Wnd = NULL; - MenuSetRosMenuInfo(&SubMenuInfo); if (!(wFlags & TPM_NONOTIFY)) SendMessageW( WndOwner, WM_UNINITMENUPOPUP, (WPARAM)ItemInfo.hSubMenu, MAKELPARAM(0, IS_SYSTEM_MENU(&SubMenuInfo)) ); + //// + // Call WM_UNINITMENUPOPUP FIRST before destroy!! + // Fixes todo_wine User32 test menu.c line 2233 GetMenuBarInfo callback.... + // + DestroyWindow(SubMenuInfo.Wnd); + SubMenuInfo.Wnd = NULL; + MenuSetRosMenuInfo(&SubMenuInfo); + //// } } }