mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 08:50:24 +08:00
[SHELL32] Don't pass menu band hwnd to InvokeCommand (#7945)
The menu band window is about to go away, don't pass it to InvokeCommand because it's invalid as an owner window for any dialogs the callee might display.
This commit is contained in:
@@ -861,7 +861,8 @@ HRESULT CMenuBand::_TrackContextMenu(IContextMenu * contextMenu, INT x, INT y)
|
||||
_MenuItemSelect(MPOS_FULLCANCEL);
|
||||
|
||||
TRACE("Before InvokeCommand\n");
|
||||
CMINVOKECOMMANDINFO cmi = { sizeof(cmi), 0, hwnd };
|
||||
// Note: Not passing hwnd to InvokeCommand because it can be a BaseBar window that is about to die
|
||||
CMINVOKECOMMANDINFO cmi = { sizeof(cmi), 0, NULL };
|
||||
cmi.lpVerb = MAKEINTRESOURCEA(uCommand - idCmdFirst);
|
||||
if (GetKeyState(VK_SHIFT) < 0)
|
||||
cmi.fMask |= CMIC_MASK_SHIFT_DOWN;
|
||||
|
||||
Reference in New Issue
Block a user