diff --git a/reactos/base/shell/explorer/taskbar/desktopbar.cpp b/reactos/base/shell/explorer/taskbar/desktopbar.cpp index 6392a0ae8aa..d51c08c6bb6 100644 --- a/reactos/base/shell/explorer/taskbar/desktopbar.cpp +++ b/reactos/base/shell/explorer/taskbar/desktopbar.cpp @@ -102,6 +102,10 @@ LRESULT DesktopBar::Init(LPCREATESTRUCT pcs) // create "Start" button HWND hwndStart = Button(_hwnd, start_str, 1, 1, start_btn_width, REBARBAND_HEIGHT, IDC_START, WS_VISIBLE|WS_CHILD|BS_OWNERDRAW); new StartButton(hwndStart); + + /* Save the handle to the window, needed for push-state handling */ + _hwndStartButton = hwndStart; + // disable double clicks SetClassLong(hwndStart, GCL_STYLE, GetClassLong(hwndStart, GCL_STYLE) & ~CS_DBLCLKS); @@ -451,7 +455,16 @@ int DesktopBar::Command(int id, int code) void DesktopBar::ShowStartMenu() { if (_startMenuRoot) - _startMenuRoot->TrackStartmenu(); + { + // set the Button, if not set + if (!Button_GetState(_hwndStartButton)) + Button_SetState(_hwndStartButton, TRUE); + + _startMenuRoot->TrackStartmenu(); + + // StartMenu was closed, release button state + Button_SetState(_hwndStartButton, false); + } } diff --git a/reactos/base/shell/explorer/taskbar/desktopbar.h b/reactos/base/shell/explorer/taskbar/desktopbar.h index 36b0f18d0bf..288142210a2 100644 --- a/reactos/base/shell/explorer/taskbar/desktopbar.h +++ b/reactos/base/shell/explorer/taskbar/desktopbar.h @@ -104,7 +104,9 @@ protected: WindowHandle _hwndNotify; WindowHandle _hwndQuickLaunch; WindowHandle _hwndrebar; - + /* Needed to make the StartButton pushed, if it's called by windowskey: SC_TASKLIST command */ + WindowHandle _hwndStartButton; + struct StartMenuRoot* _startMenuRoot; #ifdef _ROS_