https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fb4c9fbcf276c9ce5e169…
commit fb4c9fbcf276c9ce5e16991f78754822f5699d63
Author: Brock Mammen <brockmammen(a)gmail.com>
AuthorDate: Sat Mar 23 11:16:44 2019 -0500
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Mar 24 23:34:57 2019 +0100
Fix regression with double click action
The double click action is now triggered by the WM_LBUTTONDBLCLK message
instead of WM_NCLBUTTONDBLCLK.
---
base/shell/explorer/trayclock.cpp | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/base/shell/explorer/trayclock.cpp b/base/shell/explorer/trayclock.cpp
index c49f154554c..8c217c8c4c9 100644
--- a/base/shell/explorer/trayclock.cpp
+++ b/base/shell/explorer/trayclock.cpp
@@ -97,7 +97,7 @@ private:
LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnTaskbarSettingsChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
bHandled);
- LRESULT OnNcLButtonDblClick(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
bHandled);
+ LRESULT OnLButtonDblClick(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
bHandled);
public:
@@ -136,7 +136,7 @@ public:
MESSAGE_HANDLER(WM_SETFONT, OnSetFont)
MESSAGE_HANDLER(TNWM_GETMINIMUMSIZE, OnGetMinimumSize)
MESSAGE_HANDLER(TWM_SETTINGSCHANGED, OnTaskbarSettingsChanged)
- MESSAGE_HANDLER(WM_NCLBUTTONDBLCLK, OnNcLButtonDblClick)
+ MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClick)
END_MSG_MAP()
HRESULT Initialize(IN HWND hWndParent);
@@ -720,23 +720,12 @@ LRESULT CTrayClockWnd::OnTaskbarSettingsChanged(UINT uMsg, WPARAM
wParam, LPARAM
return 0;
}
-LRESULT CTrayClockWnd::OnNcLButtonDblClick(UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled)
+LRESULT CTrayClockWnd::OnLButtonDblClick(UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled)
{
if (IsWindowVisible())
{
- /* We get all WM_NCLBUTTONDBLCLK for the taskbar so we need to check if it is on
the clock*/
- RECT rcClock;
- if (GetWindowRect(&rcClock))
- {
- POINT ptClick;
- ptClick.x = MAKEPOINTS(lParam).x;
- ptClick.y = MAKEPOINTS(lParam).y;
- if (PtInRect(&rcClock, ptClick))
- {
- //FIXME: use SHRunControlPanel
- ShellExecuteW(m_hWnd, NULL, L"timedate.cpl", NULL, NULL,
SW_NORMAL);
- }
- }
+ //FIXME: use SHRunControlPanel
+ ShellExecuteW(m_hWnd, NULL, L"timedate.cpl", NULL, NULL, SW_NORMAL);
}
return TRUE;
}