[User32]
authorJames Tabor <james.tabor@reactos.org>
Wed, 7 May 2014 22:25:16 +0000 (22:25 +0000)
committerJames Tabor <james.tabor@reactos.org>
Wed, 7 May 2014 22:25:16 +0000 (22:25 +0000)
- 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

index f1ef540..13d8bed 100644 (file)
@@ -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);
+          ////
       }
   }
 }