[EXPLORER] Hide Start Menu before Run dialog (#4823)

- Add HideStartMenu helper method.
- Hide Start Menu before opening Run dialog.
CORE-13330
This commit is contained in:
Katayama Hirofumi MZ 2022-11-02 11:29:08 +09:00 committed by GitHub
parent e3ac541360
commit 802a87dfb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -850,11 +850,17 @@ public:
return TRUE; return TRUE;
} }
VOID HideStartMenu()
{
m_StartMenuPopup->OnSelect(MPOS_CANCELLEVEL);
}
LRESULT HandleHotKey(DWORD id) LRESULT HandleHotKey(DWORD id)
{ {
switch (id) switch (id)
{ {
case IDHK_RUN: case IDHK_RUN:
HideStartMenu();
DisplayRunFileDlg(); DisplayRunFileDlg();
break; break;
case IDHK_HELP: case IDHK_HELP:
@ -903,6 +909,7 @@ public:
// TODO: // TODO:
break; break;
case TRAYCMD_RUN_DIALOG: case TRAYCMD_RUN_DIALOG:
HideStartMenu();
DisplayRunFileDlg(); DisplayRunFileDlg();
break; break;
case TRAYCMD_LOGOFF_DIALOG: case TRAYCMD_LOGOFF_DIALOG:
@ -3062,13 +3069,9 @@ HandleTrayContextMenu:
return FALSE; return FALSE;
if (::IsWindowVisible(hwndStartMenu)) if (::IsWindowVisible(hwndStartMenu))
{ HideStartMenu();
m_StartMenuPopup->OnSelect(MPOS_CANCELLEVEL);
}
else else
{
PopupStartMenu(); PopupStartMenu();
}
return TRUE; return TRUE;
} }