Skip to content

Commit

Permalink
[EXPLORER] Hide Start Menu before Run dialog (#4823)
Browse files Browse the repository at this point in the history
- Add HideStartMenu helper method.
- Hide Start Menu before opening Run dialog.
CORE-13330
  • Loading branch information
katahiromz committed Nov 2, 2022
1 parent e3ac541 commit 802a87d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions base/shell/explorer/traywnd.cpp
Expand Up @@ -850,11 +850,17 @@ class CTrayWindow :
return TRUE;
}

VOID HideStartMenu()
{
m_StartMenuPopup->OnSelect(MPOS_CANCELLEVEL);
}

LRESULT HandleHotKey(DWORD id)
{
switch (id)
{
case IDHK_RUN:
HideStartMenu();
DisplayRunFileDlg();
break;
case IDHK_HELP:
Expand Down Expand Up @@ -903,6 +909,7 @@ class CTrayWindow :
// TODO:
break;
case TRAYCMD_RUN_DIALOG:
HideStartMenu();
DisplayRunFileDlg();
break;
case TRAYCMD_LOGOFF_DIALOG:
Expand Down Expand Up @@ -3062,13 +3069,9 @@ class CTrayWindow :
return FALSE;

if (::IsWindowVisible(hwndStartMenu))
{
m_StartMenuPopup->OnSelect(MPOS_CANCELLEVEL);
}
HideStartMenu();
else
{
PopupStartMenu();
}

return TRUE;
}
Expand Down

0 comments on commit 802a87d

Please sign in to comment.