Author: dquintana
Date: Thu Mar 6 03:04:50 2014
New Revision: 62436
URL:
http://svn.reactos.org/svn/reactos?rev=62436&view=rev
Log:
[NTUSER]
* Revert a change that removed too much. Unbreaks the "New..." menu, and
anywhere else that required this, although the code feels like a workaround for a bug
elsewhere.
Modified:
branches/shell-experiments/win32ss/user/ntuser/menu.c
Modified: branches/shell-experiments/win32ss/user/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
==============================================================================
--- branches/shell-experiments/win32ss/user/ntuser/menu.c [iso-8859-1] (original)
+++ branches/shell-experiments/win32ss/user/ntuser/menu.c [iso-8859-1] Thu Mar 6 03:04:50
2014
@@ -653,6 +653,7 @@
BOOL FASTCALL
IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINFO lpmii)
{
+ PMENU_OBJECT SubMenuObject;
UINT fTypeMask = (MFT_BITMAP | MFT_MENUBARBREAK | MFT_MENUBREAK | MFT_OWNERDRAW |
MFT_RADIOCHECK | MFT_RIGHTJUSTIFY | MFT_SEPARATOR);
if(!MenuItem || !MenuObject || !lpmii)
@@ -734,6 +735,15 @@
if(lpmii->fMask & MIIM_SUBMENU)
{
MenuItem->hSubMenu = lpmii->hSubMenu;
+ /* Make sure the submenu is marked as a popup menu */
+ if (MenuItem->hSubMenu)
+ {
+ SubMenuObject = UserGetMenuObject(MenuItem->hSubMenu);
+ if (SubMenuObject != NULL)
+ {
+ SubMenuObject->MenuInfo.Flags |= MF_POPUP;
+ }
+ }
}
if ((lpmii->fMask & MIIM_STRING) ||