Author: rharabien
Date: Thu Oct 13 15:50:24 2011
New Revision: 54113
URL:
http://svn.reactos.org/svn/reactos?rev=54113&view=rev
Log:
[EXPLORER] - If Start Menu is open, WIN key hides it
Modified:
trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp
trunk/reactos/base/shell/explorer/taskbar/desktopbar.h
trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp
trunk/reactos/base/shell/explorer/taskbar/startmenu.h
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] Thu Oct 13
15:50:24 2011
@@ -306,7 +306,7 @@
else
return 0; // disable any other resizing
} else if (wparam == SC_TASKLIST)
- ShowStartMenu();
+ ShowOrHideStartMenu();
goto def;
case WM_SIZE:
@@ -430,7 +430,7 @@
{
switch(id) {
case IDC_START:
- ShowStartMenu();
+ ShowOrHideStartMenu();
break;
case ID_ABOUT_EXPLORER:
@@ -484,7 +484,7 @@
}
-void DesktopBar::ShowStartMenu()
+void DesktopBar::ShowOrHideStartMenu()
{
if (_startMenuRoot)
{
@@ -492,7 +492,10 @@
if (!Button_GetState(_hwndStartButton))
Button_SetState(_hwndStartButton, TRUE);
- _startMenuRoot->TrackStartmenu();
+ if (_startMenuRoot->IsStartMenuVisible())
+ _startMenuRoot->CloseStartMenu();
+ else
+ _startMenuRoot->TrackStartmenu();
// StartMenu was closed, release button state
Button_SetState(_hwndStartButton, false);
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskbar/desktopbar.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/taskbar/desktopbar.h [iso-8859-1] Thu Oct 13
15:50:24 2011
@@ -103,7 +103,7 @@
void ControlResize(WPARAM wparam, LPARAM lparam);
void RegisterHotkeys();
void ProcessHotKey(int id_hotkey);
- void ShowStartMenu();
+ void ShowOrHideStartMenu();
LRESULT ProcessCopyData(COPYDATASTRUCT* pcd);
WindowHandle _hwndTaskBar;
Modified: trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp [iso-8859-1] Thu Oct 13
15:50:24 2011
@@ -1872,6 +1872,11 @@
ShowWindow(_hwnd, SW_HIDE);
}
+bool StartMenuRoot::IsStartMenuVisible() const
+{
+ return IsWindowVisible(_hwnd);
+}
+
void StartMenuRoot::ProcessKey(int vk)
{
switch(vk) {
Modified: trunk/reactos/base/shell/explorer/taskbar/startmenu.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskbar/startmenu.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/taskbar/startmenu.h [iso-8859-1] Thu Oct 13 15:50:24
2011
@@ -369,6 +369,8 @@
static HWND Create(HWND hwndDesktopBar, int icon_size);
void TrackStartmenu();
+ void CloseStartMenu(int id=0);
+ bool IsStartMenuVisible() const;
int Command(int id, int code);
HWND _hwndStartButton;
@@ -383,7 +385,7 @@
virtual void ProcessKey(int vk);
void Paint(PaintCanvas& canvas);
- void CloseStartMenu(int id=0);
+
void ReadLogoSize();
UINT GetLogoResId();