[SHELL32] CMenuBand must set ShowWindow value for InvokeCommand (#7695)

This commit is contained in:
Whindmar Saksit 2025-02-01 13:50:22 +01:00 committed by GitHub
parent ee19792605
commit 77e4217919
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -865,6 +865,7 @@ HRESULT CMenuBand::_TrackContextMenu(IContextMenu * contextMenu, INT x, INT y)
cmi.fMask |= CMIC_MASK_SHIFT_DOWN;
if (GetKeyState(VK_CONTROL) < 0)
cmi.fMask |= CMIC_MASK_CONTROL_DOWN;
cmi.nShow = SW_SHOW;
hr = contextMenu->InvokeCommand(&cmi);
TRACE("InvokeCommand returned hr=%08x\n", hr);
}

View file

@ -1461,7 +1461,7 @@ static HRESULT shellex_run_context_menu_default(IShellExtInit *obj,
memset(&ici, 0, sizeof ici);
ici.cbSize = sizeof ici;
ici.fMask = CMIC_MASK_UNICODE | (sei->fMask & (SEE_MASK_NO_CONSOLE | SEE_MASK_NOASYNC | SEE_MASK_ASYNCOK | SEE_MASK_FLAG_NO_UI));
ici.fMask = (sei->fMask & SEE_CMIC_COMMON_BASICFLAGS) | CMIC_MASK_UNICODE;
ici.nShow = sei->nShow;
ici.lpVerb = MAKEINTRESOURCEA(def);
ici.hwnd = sei->hwnd;
@ -1794,7 +1794,7 @@ SHELL_InvokePidl(
// Invoke a command
CMINVOKECOMMANDINFO ici = { sizeof(ici) };
ici.fMask = (sei->fMask & (SEE_MASK_NO_CONSOLE | SEE_MASK_ASYNCOK | SEE_MASK_FLAG_NO_UI));
ici.fMask = (sei->fMask & SEE_CMIC_COMMON_BASICFLAGS) & ~CMIC_MASK_UNICODE; // FIXME: Unicode?
ici.nShow = sei->nShow;
ici.hwnd = sei->hwnd;
char szVerb[VERBKEY_CCHMAX];