mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[EXPLORER] - If Start Menu is open, WIN key hides it
svn path=/trunk/; revision=54113
This commit is contained in:
parent
143732711e
commit
eaf2462310
4 changed files with 16 additions and 6 deletions
|
@ -306,7 +306,7 @@ LRESULT DesktopBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||||
else
|
else
|
||||||
return 0; // disable any other resizing
|
return 0; // disable any other resizing
|
||||||
} else if (wparam == SC_TASKLIST)
|
} else if (wparam == SC_TASKLIST)
|
||||||
ShowStartMenu();
|
ShowOrHideStartMenu();
|
||||||
goto def;
|
goto def;
|
||||||
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
|
@ -430,7 +430,7 @@ int DesktopBar::Command(int id, int code)
|
||||||
{
|
{
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case IDC_START:
|
case IDC_START:
|
||||||
ShowStartMenu();
|
ShowOrHideStartMenu();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_ABOUT_EXPLORER:
|
case ID_ABOUT_EXPLORER:
|
||||||
|
@ -484,7 +484,7 @@ int DesktopBar::Command(int id, int code)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DesktopBar::ShowStartMenu()
|
void DesktopBar::ShowOrHideStartMenu()
|
||||||
{
|
{
|
||||||
if (_startMenuRoot)
|
if (_startMenuRoot)
|
||||||
{
|
{
|
||||||
|
@ -492,7 +492,10 @@ void DesktopBar::ShowStartMenu()
|
||||||
if (!Button_GetState(_hwndStartButton))
|
if (!Button_GetState(_hwndStartButton))
|
||||||
Button_SetState(_hwndStartButton, TRUE);
|
Button_SetState(_hwndStartButton, TRUE);
|
||||||
|
|
||||||
_startMenuRoot->TrackStartmenu();
|
if (_startMenuRoot->IsStartMenuVisible())
|
||||||
|
_startMenuRoot->CloseStartMenu();
|
||||||
|
else
|
||||||
|
_startMenuRoot->TrackStartmenu();
|
||||||
|
|
||||||
// StartMenu was closed, release button state
|
// StartMenu was closed, release button state
|
||||||
Button_SetState(_hwndStartButton, false);
|
Button_SetState(_hwndStartButton, false);
|
||||||
|
|
|
@ -103,7 +103,7 @@ protected:
|
||||||
void ControlResize(WPARAM wparam, LPARAM lparam);
|
void ControlResize(WPARAM wparam, LPARAM lparam);
|
||||||
void RegisterHotkeys();
|
void RegisterHotkeys();
|
||||||
void ProcessHotKey(int id_hotkey);
|
void ProcessHotKey(int id_hotkey);
|
||||||
void ShowStartMenu();
|
void ShowOrHideStartMenu();
|
||||||
LRESULT ProcessCopyData(COPYDATASTRUCT* pcd);
|
LRESULT ProcessCopyData(COPYDATASTRUCT* pcd);
|
||||||
|
|
||||||
WindowHandle _hwndTaskBar;
|
WindowHandle _hwndTaskBar;
|
||||||
|
|
|
@ -1872,6 +1872,11 @@ void StartMenuRoot::CloseStartMenu(int id)
|
||||||
ShowWindow(_hwnd, SW_HIDE);
|
ShowWindow(_hwnd, SW_HIDE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool StartMenuRoot::IsStartMenuVisible() const
|
||||||
|
{
|
||||||
|
return IsWindowVisible(_hwnd);
|
||||||
|
}
|
||||||
|
|
||||||
void StartMenuRoot::ProcessKey(int vk)
|
void StartMenuRoot::ProcessKey(int vk)
|
||||||
{
|
{
|
||||||
switch(vk) {
|
switch(vk) {
|
||||||
|
|
|
@ -369,6 +369,8 @@ struct StartMenuRoot : public StartMenuHandler
|
||||||
|
|
||||||
static HWND Create(HWND hwndDesktopBar, int icon_size);
|
static HWND Create(HWND hwndDesktopBar, int icon_size);
|
||||||
void TrackStartmenu();
|
void TrackStartmenu();
|
||||||
|
void CloseStartMenu(int id=0);
|
||||||
|
bool IsStartMenuVisible() const;
|
||||||
int Command(int id, int code);
|
int Command(int id, int code);
|
||||||
|
|
||||||
HWND _hwndStartButton;
|
HWND _hwndStartButton;
|
||||||
|
@ -383,7 +385,7 @@ protected:
|
||||||
virtual void ProcessKey(int vk);
|
virtual void ProcessKey(int vk);
|
||||||
|
|
||||||
void Paint(PaintCanvas& canvas);
|
void Paint(PaintCanvas& canvas);
|
||||||
void CloseStartMenu(int id=0);
|
|
||||||
|
|
||||||
void ReadLogoSize();
|
void ReadLogoSize();
|
||||||
UINT GetLogoResId();
|
UINT GetLogoResId();
|
||||||
|
|
Loading…
Reference in a new issue