Index: reactos/base/shell/explorer/traywnd.cpp =================================================================== --- reactos/base/shell/explorer/traywnd.cpp (revision 74629) +++ reactos/base/shell/explorer/traywnd.cpp (working copy) @@ -2454,6 +2454,38 @@ return TRUE; } + LRESULT OnNcLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) + { + LRESULT Ret = FALSE; + //__debugbreak(); + + POINT pt; + GetCursorPos(&pt); + + RECT rc; + if (m_StartButton.GetWindowRect(&rc)) + { + int xPos = pt.x; + int yPos = pt.y; + if (xPos >= (rc.left-4) && xPos <= (rc.right+4) && + yPos >= (rc.top-4) && yPos <= (rc.bottom+4)) + { + if (xPos <= rc.left) + xPos = rc.left + 1; + else if (xPos >= rc.right) + xPos = rc.right -1; + if (yPos <= rc.top) + yPos = rc.top + 1; + else if (yPos >= rc.bottom) + yPos = rc.bottom -1; + + SetCursorPos(xPos, yPos); + m_StartButton.SendMessageW(WM_LBUTTONDOWN, 0, 0); + } + } + return Ret; + } + LRESULT OnNcRButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { /* We want the user to be able to get a context menu even on the nonclient @@ -2807,6 +2839,7 @@ MESSAGE_HANDLER(WM_ENTERSIZEMOVE, OnEnterSizeMove) MESSAGE_HANDLER(WM_EXITSIZEMOVE, OnExitSizeMove) MESSAGE_HANDLER(WM_SYSCHAR, OnSysChar) + MESSAGE_HANDLER(WM_NCLBUTTONDOWN, OnNcLButtonDown) MESSAGE_HANDLER(WM_NCRBUTTONUP, OnNcRButtonUp) MESSAGE_HANDLER(WM_NCLBUTTONDBLCLK, OnNcLButtonDblClick) MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)