Skip to content

Commit 77e4217

Browse files
authored
[SHELL32] CMenuBand must set ShowWindow value for InvokeCommand (reactos#7695)
1 parent ee19792 commit 77e4217

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dll/win32/shell32/shellmenu/CMenuBand.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ HRESULT CMenuBand::_TrackContextMenu(IContextMenu * contextMenu, INT x, INT y)
865865
cmi.fMask |= CMIC_MASK_SHIFT_DOWN;
866866
if (GetKeyState(VK_CONTROL) < 0)
867867
cmi.fMask |= CMIC_MASK_CONTROL_DOWN;
868+
cmi.nShow = SW_SHOW;
868869
hr = contextMenu->InvokeCommand(&cmi);
869870
TRACE("InvokeCommand returned hr=%08x\n", hr);
870871
}

dll/win32/shell32/shlexec.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ static HRESULT shellex_run_context_menu_default(IShellExtInit *obj,
14611461

14621462
memset(&ici, 0, sizeof ici);
14631463
ici.cbSize = sizeof ici;
1464-
ici.fMask = CMIC_MASK_UNICODE | (sei->fMask & (SEE_MASK_NO_CONSOLE | SEE_MASK_NOASYNC | SEE_MASK_ASYNCOK | SEE_MASK_FLAG_NO_UI));
1464+
ici.fMask = (sei->fMask & SEE_CMIC_COMMON_BASICFLAGS) | CMIC_MASK_UNICODE;
14651465
ici.nShow = sei->nShow;
14661466
ici.lpVerb = MAKEINTRESOURCEA(def);
14671467
ici.hwnd = sei->hwnd;
@@ -1794,7 +1794,7 @@ SHELL_InvokePidl(
17941794

17951795
// Invoke a command
17961796
CMINVOKECOMMANDINFO ici = { sizeof(ici) };
1797-
ici.fMask = (sei->fMask & (SEE_MASK_NO_CONSOLE | SEE_MASK_ASYNCOK | SEE_MASK_FLAG_NO_UI));
1797+
ici.fMask = (sei->fMask & SEE_CMIC_COMMON_BASICFLAGS) & ~CMIC_MASK_UNICODE; // FIXME: Unicode?
17981798
ici.nShow = sei->nShow;
17991799
ici.hwnd = sei->hwnd;
18001800
char szVerb[VERBKEY_CCHMAX];

0 commit comments

Comments
 (0)