[SHLWAPI]
authorDavid Quintana <gigaherz@gmail.com>
Wed, 5 Mar 2014 09:12:40 +0000 (09:12 +0000)
committerDavid Quintana <gigaherz@gmail.com>
Wed, 5 Mar 2014 09:12:40 +0000 (09:12 +0000)
* SHInvokeDefaultCommand is supposed to invoke the DEFAULT command, so why was bInvokeDefault given FALSE?!

[RSHELL]
* A couple of trivial fixes.

[NTUSER/USER32]
* I missed two bits. See CORE-7966 for more info on the menu issue.

CORE-7586

svn path=/branches/shell-experiments/; revision=62420

base/shell/rshell/CMenuDeskBar.cpp
base/shell/rshell/CMenuToolbars.cpp
dll/win32/shlwapi/ordinal.c
win32ss/user/ntuser/window.c
win32ss/user/user32/windows/menu.c

index d9007d1..5feed65 100644 (file)
@@ -517,7 +517,7 @@ BOOL CMenuDeskBar::_IsSubMenuParent(HWND hwnd)
 
         popup = NULL;
         hr = IUnknown_GetSite(window, IID_PPV_ARG(IMenuPopup, &popup));
-        if (FAILED_UNEXPECTEDLY(hr))
+        if (FAILED(hr))
             return FALSE;
     }
 
index e66d93e..4d79750 100644 (file)
@@ -816,7 +816,7 @@ HRESULT CMenuStaticToolbar::FillToolbar()
         {
             AddSeparator(last);
         }
-        else // if (info.fType == MFT_STRING)
+        else if (!(info.fType & MFT_BITMAP))
         {
 
             info.cch++;
index 233d3ec..d391800 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*
  * SHLWAPI ordinal functions
  *
  * Copyright 1997 Marcus Meissner
@@ -2911,7 +2911,7 @@ HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle
 HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder* lpFolder, LPCITEMIDLIST lpApidl)
 {
     TRACE("%p %p %p\n", hWnd, lpFolder, lpApidl);
-    return SHInvokeCommand(hWnd, lpFolder, lpApidl, FALSE);
+    return SHInvokeCommand(hWnd, lpFolder, lpApidl, TRUE);
 }
 
 /*************************************************************************
index 91feae4..d2e06c8 100644 (file)
@@ -976,7 +976,7 @@ IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu)
 
             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 db94c16..f99b825 100644 (file)
@@ -1696,7 +1696,7 @@ static void FASTCALL MenuSelectItem(HWND hwndOwner, PROSMENUINFO hmenu, UINT wIn
                 SendMessageW(hwndOwner, WM_MENUSELECT,
                            MAKELONG(ItemInfo.hSubMenu ? wIndex : ItemInfo.wID,
                                     ItemInfo.fType | ItemInfo.fState | MF_MOUSESELECT |
-                                    (hmenu->Flags & MF_SYSMENU)), (LPARAM) hmenu->Self);
+                                    (hmenu->Flags & (MF_SYSMENU|MF_POPUP))), (LPARAM) hmenu->Self);
             }
         }
     }