Make windows button open start menu. Fixes buf 1356. Patch by SuperTrax@gmx.de

svn path=/trunk/; revision=21542
This commit is contained in:
Saveliy Tretiakov 2006-04-10 17:58:47 +00:00
parent a87b34d546
commit 45fca8f1a3
2 changed files with 17 additions and 2 deletions

View file

@ -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);
}
}

View file

@ -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_