[SHELL32][SHDOCVW] Only forward menu messages to the correct shell extension (#7968)

Folder Marker 1.4 fails if it gets a WM_INITPOPUPMENU it does not expect.

CORE-17811
This commit is contained in:
Whindmar Saksit 2025-05-15 12:21:22 +02:00 committed by GitHub
parent 6bfb792439
commit 53685ada35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 77 additions and 81 deletions

View file

@ -635,6 +635,12 @@ typedef CCoInitBase<OleInitialize, OleUninitialize> COleInit;
#define SEE_CMIC_COMMON_FLAGS (SEE_CMIC_COMMON_BASICFLAGS | SEE_MASK_HOTKEY | SEE_MASK_ICON | \
SEE_MASK_HASLINKNAME | SEE_MASK_HASTITLE)
static inline BOOL SHELL_IsContextMenuMsg(UINT uMsg)
{
return uMsg == WM_MEASUREITEM || uMsg == WM_DRAWITEM ||
uMsg == WM_INITMENUPOPUP || uMsg == WM_MENUSELECT || uMsg == WM_MENUCHAR;
}
static inline BOOL ILIsSingle(LPCITEMIDLIST pidl)
{
return pidl == ILFindLastID(pidl);