Author: tretiakov Date: Mon Apr 10 21:58:47 2006 New Revision: 21542
URL: http://svn.reactos.ru/svn/reactos?rev=21542&view=rev Log: Make windows button open start menu. Fixes buf 1356. Patch by SuperTrax@gmx.de
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp trunk/reactos/base/shell/explorer/taskbar/desktopbar.h
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/base/shell/explorer/taskbar/... ============================================================================== --- trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp (original) +++ trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp Mon Apr 10 21:58:47 2006 @@ -102,6 +102,10 @@ // 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 @@ 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); + } }
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.h URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/base/shell/explorer/taskbar/... ============================================================================== --- trunk/reactos/base/shell/explorer/taskbar/desktopbar.h (original) +++ trunk/reactos/base/shell/explorer/taskbar/desktopbar.h Mon Apr 10 21:58:47 2006 @@ -104,7 +104,9 @@ 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_