Index: win32ss/user/ntuser/menu.c
===================================================================
--- win32ss/user/ntuser/menu.c	(revision 62528)
+++ win32ss/user/ntuser/menu.c	(working copy)
@@ -458,7 +458,7 @@
       PMENU_ITEM item = Menu->MenuItemList;
       for ( i = Menu->MenuInfo.MenuItemCount; i; i--, item = item->Next)
       {
-         if ( item->fType & MF_POPUP ) // item->hSubMenu )
+         if ( item->hSubMenu )
          {
             PMENU_OBJECT SubMenu;
             if (!(SubMenu = UserGetMenuObject(item->hSubMenu))) continue;
@@ -539,7 +539,7 @@
          }
          else
          {
-            if(CurItem->fType & MF_POPUP)
+            if(CurItem->hSubMenu)
             {
                PMENU_OBJECT NewMenu = UserGetMenuObject(CurItem->hSubMenu);
                if(NewMenu)
@@ -664,7 +664,7 @@
 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 | MF_POPUP);
+   UINT fTypeMask = (MFT_BITMAP | MFT_MENUBARBREAK | MFT_MENUBREAK | MFT_OWNERDRAW | MFT_RADIOCHECK | MFT_RIGHTJUSTIFY | MFT_SEPARATOR);
 
    if(!MenuItem || !MenuObject || !lpmii)
    {
@@ -752,17 +752,8 @@
          if (SubMenuObject != NULL)
          {
             SubMenuObject->MenuInfo.Flags |= MNF_POPUP;
-            MenuItem->fType |= MF_POPUP;
          }
-         else
-         {
-            MenuItem->fType &= ~MF_POPUP;
-         }
       }
-      else
-      {
-         MenuItem->fType &= ~MF_POPUP;
-      }
    }
 
    if ((lpmii->fMask & MIIM_STRING) ||
@@ -1479,7 +1470,7 @@
           return NO_SELECTED_ITEM;
        }
 
-       if (!(mi->fType & MF_POPUP)) continue;
+       if (!(mi->hSubMenu)) continue;
 
        if (mi->hSubMenu == hSubTarget)
        {
Index: win32ss/user/ntuser/window.c
===================================================================
--- win32ss/user/ntuser/window.c	(revision 62528)
+++ win32ss/user/ntuser/window.c	(working copy)
@@ -977,7 +977,7 @@
 
             ItemInfo.cbSize = sizeof(MENUITEMINFOW);
             ItemInfo.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE | MIIM_SUBMENU;
-            ItemInfo.fType = MF_POPUP;
+            ItemInfo.fType = 0;
             ItemInfo.fState = MFS_ENABLED;
             ItemInfo.dwTypeData = NULL;
             ItemInfo.cch = 0;
Index: win32ss/user/user32/windows/menu.c
===================================================================
--- win32ss/user/user32/windows/menu.c	(revision 62528)
+++ win32ss/user/user32/windows/menu.c	(working copy)
@@ -399,7 +399,7 @@
             MenuCleanupRosMenuItemInfo(&item);
             return NO_SELECTED_ITEM;
         }
-        if (!(item.fType & MF_POPUP)) continue;
+        if (!(item.hSubMenu)) continue;
         if (item.hSubMenu == hSubTarget) {
             MenuCleanupRosMenuItemInfo(&item);
             return i;
@@ -1214,7 +1214,7 @@
 	        dis.rcItem.bottom);
         SendMessageW(WndOwner, WM_DRAWITEM, 0, (LPARAM) &dis);
         /* Draw the popup-menu arrow */
-        if (lpitem->fType & MF_POPUP)
+        if (lpitem->hSubMenu)
         {
             RECT rectTemp;
             CopyRect(&rectTemp, &rect);
@@ -1352,7 +1352,7 @@
             }
         }
         /* Draw the popup-menu arrow */
-        if (lpitem->fType & MF_POPUP)
+        if (lpitem->hSubMenu)
         {
             RECT rectTemp;
             CopyRect(&rectTemp, &rect);
@@ -1706,8 +1706,8 @@
             }
             if (sendMenuSelect)
             {
-                WPARAM wParam = MAKEWPARAM( ItemInfo.fType & MF_POPUP ? wIndex : ItemInfo.wID, 
-                                            ItemInfo.fType | ItemInfo.fState |
+                WPARAM wParam = MAKEWPARAM( ItemInfo.hSubMenu ? wIndex : ItemInfo.wID, 
+                                            ItemInfo.fType | ItemInfo.fState | (ItemInfo.hSubMenu ? MF_POPUP : 0) |
                                             (hmenu->Flags & MNF_SYSDESKMN ? MF_SYSMENU : 0 ) );
 
                 SendMessageW(hwndOwner, WM_MENUSELECT, wParam, (LPARAM) hmenu->Self);
@@ -1714,8 +1714,10 @@
             }
         }
     }
-    else if (sendMenuSelect) {
-        if(topmenu) {
+    else if (sendMenuSelect) 
+    {
+        if(topmenu) 
+        {
             int pos;
             pos = MenuFindSubMenu(&topmenu, hmenu->Self);
             if (pos != NO_SELECTED_ITEM)
@@ -1723,7 +1725,7 @@
                 if (MenuGetRosMenuInfo(&TopMenuInfo, topmenu)
                     && MenuGetRosMenuItemInfo(topmenu, pos, &ItemInfo))
                 {
-                    WPARAM wParam = MAKEWPARAM( Pos, ItemInfo.fType | ItemInfo.fState |
+                    WPARAM wParam = MAKEWPARAM(Pos, ItemInfo.fType | ItemInfo.fState | (ItemInfo.hSubMenu ? MF_POPUP : 0) |
                                                (TopMenuInfo.Flags & MNF_SYSDESKMN ? MF_SYSMENU : 0 ) );
 
                     SendMessageW(hwndOwner, WM_MENUSELECT, wParam, (LPARAM) topmenu);
@@ -2100,7 +2102,6 @@
                 return NULL;
             }
             mii.fMask |= MIIM_SUBMENU;
-            mii.fType |= MF_POPUP;
         }
         else if (!mii.dwTypeData[0] && !(mii.fType & MF_SEPARATOR))
         {
@@ -2300,7 +2301,7 @@
       MenuCleanupRosMenuItemInfo(&ItemInfo);
       return MenuInfo->Self;
     }
-  if (0 == (ItemInfo.fType & MF_POPUP) || 0 != (ItemInfo.fState & (MF_GRAYED | MF_DISABLED)))
+  if (0 == (ItemInfo.hSubMenu) || 0 != (ItemInfo.fState & (MF_GRAYED | MF_DISABLED)))
     {
       MenuCleanupRosMenuItemInfo(&ItemInfo);
       return MenuInfo->Self;
@@ -2441,7 +2442,7 @@
       MenuInitRosMenuItemInfo(&ItemInfo);
       ItemInfo.fMask |= MIIM_FTYPE | MIIM_STATE;
       if (! MenuGetRosMenuItemInfo(MenuInfo->Self, MenuInfo->FocusedItem, &ItemInfo)
-          || 0 == (ItemInfo.fType & MF_POPUP)
+          || 0 == (ItemInfo.hSubMenu)
           || 0 == (ItemInfo.fState & MF_MOUSESELECT))
       {
           MenuCleanupRosMenuItemInfo(&ItemInfo);
@@ -2526,7 +2527,7 @@
 
   TRACE("%p %08x %p\n", MenuInfo, ItemInfo.wID, ItemInfo.hSubMenu);
 
-  if (0 == (ItemInfo.fType & MF_POPUP))
+  if (0 == (ItemInfo.hSubMenu))
     {
       if (0 == (ItemInfo.fState & (MF_GRAYED | MF_DISABLED))
           && 0 == (ItemInfo.fType & MF_SEPARATOR))
@@ -2660,7 +2661,7 @@
       if (0 <= Id && MenuGetRosMenuItemInfo(MenuInfo.Self, Id, &ItemInfo) &&
           MenuInfo.FocusedItem == Id)
         {
-          if (0 == (ItemInfo.fType & MF_POPUP))
+          if (0 == (ItemInfo.hSubMenu))
             {
               INT ExecutedMenuId = MenuExecFocusedItem(Mt, &MenuInfo, Flags);
               MenuCleanupRosMenuItemInfo(&ItemInfo);
@@ -2709,7 +2710,7 @@
     {
       MenuInitRosMenuItemInfo(&ItemInfo);
       if (MenuGetRosMenuItemInfo(MenuInfo.Self, MenuInfo.FocusedItem, &ItemInfo) &&
-          0 != (ItemInfo.fType & MF_POPUP) &&
+          0 != (ItemInfo.hSubMenu) &&
           0 != (ItemInfo.fState & MF_MOUSESELECT))
         {
           Ret = MenuPtMenu(ItemInfo.hSubMenu, Pt);
@@ -2823,7 +2824,7 @@
       MenuCleanupRosMenuItemInfo(&ItemInfo);
       return NULL;
     }
-  if (0 != (ItemInfo.fType & MF_POPUP) && 0 != (ItemInfo.fState & MF_MOUSESELECT))
+  if (0 != (ItemInfo.hSubMenu) && 0 != (ItemInfo.fState & MF_MOUSESELECT))
     {
       MenuCleanupRosMenuItemInfo(&ItemInfo);
       return ItemInfo.hSubMenu;
@@ -3883,7 +3884,6 @@
 
   if(Flags & MF_POPUP)
   {
-    mii->fType |= MF_POPUP;
     mii->fMask |= MIIM_SUBMENU;
     mii->hSubMenu = (HMENU)IDNewItem;
   }
@@ -3993,7 +3993,7 @@
     if (0 != (Items[i].fType & MF_MENUBARBREAK)) continue;
     if (0 != (Items[i].fType & MF_SEPARATOR)) continue;
 
-    if ((Items[i].fType & MF_POPUP) && (uFlags == MF_BYCOMMAND))
+    if ((Items[i].hSubMenu) && (uFlags == MF_BYCOMMAND))
     {
       MenuCheckMenuRadioItem(Items[i].hSubMenu, idFirst, idLast, idCheck, uFlags, bCheck, pChecked, pUnchecked, pMenuChanged);
       continue;
@@ -4897,7 +4897,7 @@
 
   if(!MenuGetRosMenuItemInfo( hMnu, uPosition, &rmii)) return FALSE;
 
-  if ((rmii.fType & MF_POPUP) && (uFlags & MF_POPUP) && (rmii.hSubMenu != (HMENU)uIDNewItem))
+  if (rmii.hSubMenu && (uFlags & MF_POPUP) && (rmii.hSubMenu != (HMENU)uIDNewItem))
     NtUserDestroyMenu( rmii.hSubMenu );   /* ModifyMenu() spec */
 
   MenuCleanupRosMenuItemInfo( &rmii );
@@ -4944,7 +4944,7 @@
 
   if(!MenuGetRosMenuItemInfo( hMnu, uPosition, &rmii)) return FALSE;
 
-  if ((rmii.fType & MF_POPUP) && (uFlags & MF_POPUP) && (rmii.hSubMenu != (HMENU)uIDNewItem))
+  if (rmii.hSubMenu && (uFlags & MF_POPUP) && (rmii.hSubMenu != (HMENU)uIDNewItem))
     NtUserDestroyMenu( rmii.hSubMenu );   /* ModifyMenu() spec */
 
   MenuCleanupRosMenuItemInfo( &rmii );
