From 6b8f40459412cf208b4e38b1e6de37f1bc57fae8 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Thu, 8 Jun 2017 18:57:53 +0000 Subject: [PATCH] [EXPLORER] -Open the start menu on mouse down. Patch by Joachim Henze (reactosfanboy). CORE-13375 svn path=/trunk/; revision=74965 --- reactos/base/shell/explorer/traywnd.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/reactos/base/shell/explorer/traywnd.cpp b/reactos/base/shell/explorer/traywnd.cpp index d4920552987..88908e24810 100644 --- a/reactos/base/shell/explorer/traywnd.cpp +++ b/reactos/base/shell/explorer/traywnd.cpp @@ -62,7 +62,7 @@ static const WCHAR szTrayWndClass[] = L"Shell_TrayWnd"; const GUID IID_IShellDesktopTray = { 0x213e2df9, 0x9a14, 0x4328, { 0x99, 0xb1, 0x69, 0x61, 0xf9, 0x14, 0x3c, 0xe9 } }; class CStartButton - : public CWindow + : public CWindowImpl { HIMAGELIST m_ImageList; SIZE m_Size; @@ -125,6 +125,7 @@ public: VOID Initialize() { + SubclassWindow(m_hWnd); SetWindowTheme(m_hWnd, L"Start", NULL); m_ImageList = ImageList_LoadImageW(hExplorerInstance, @@ -167,6 +168,20 @@ public: return m_hWnd; } + + LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) + { + if (uMsg == WM_KEYUP && wParam != VK_SPACE) + return 0; + + GetParent().PostMessage(TWM_OPENSTARTMENU); + return 0; + } + + BEGIN_MSG_MAP(CStartButton) + MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) + END_MSG_MAP() + }; class CTrayWindow : @@ -2696,7 +2711,6 @@ HandleTrayContextMenu: if ((HWND) lParam == m_StartButton.m_hWnd) { - PopupStartMenu(); return FALSE; }