https://git.reactos.org/?p=reactos.git;a=commitdiff;h=77e4217919a2e5cf8b4fef8db32e64678307e746

commit 77e4217919a2e5cf8b4fef8db32e64678307e746
Author:     Whindmar Saksit <whinds...@proton.me>
AuthorDate: Sat Feb 1 13:50:22 2025 +0100
Commit:     GitHub <nore...@github.com>
CommitDate: Sat Feb 1 13:50:22 2025 +0100

    [SHELL32] CMenuBand must set ShowWindow value for InvokeCommand (#7695)
---
 dll/win32/shell32/shellmenu/CMenuBand.cpp | 1 +
 dll/win32/shell32/shlexec.cpp             | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dll/win32/shell32/shellmenu/CMenuBand.cpp 
b/dll/win32/shell32/shellmenu/CMenuBand.cpp
index 486f745c6b0..36c58121984 100644
--- a/dll/win32/shell32/shellmenu/CMenuBand.cpp
+++ b/dll/win32/shell32/shellmenu/CMenuBand.cpp
@@ -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);
     }
diff --git a/dll/win32/shell32/shlexec.cpp b/dll/win32/shell32/shlexec.cpp
index 9e3af71a27f..cf04d935742 100644
--- a/dll/win32/shell32/shlexec.cpp
+++ b/dll/win32/shell32/shlexec.cpp
@@ -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];

Reply via email to