[EXPLORER] Follow-up of #4718 (ba2cead)

Handle click OnNcLButtonUp instead of OnNcLButtonDown/OnNcLButtonDblClick.
CORE-15369
This commit is contained in:
Katayama Hirofumi MZ 2022-09-23 08:25:27 +09:00
parent ba2cead8a2
commit 46de3a22ac

View file

@ -2861,9 +2861,6 @@ ChangePos:
bHandled = FALSE; bHandled = FALSE;
if (CheckShowDesktopButtonClick(lParam, bHandled))
return TRUE;
RECT rcStartBtn; RECT rcStartBtn;
m_StartButton.GetWindowRect(&rcStartBtn); m_StartButton.GetWindowRect(&rcStartBtn);
@ -3038,9 +3035,6 @@ HandleTrayContextMenu:
LRESULT OnNcLButtonDblClick(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) LRESULT OnNcLButtonDblClick(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{ {
if (CheckShowDesktopButtonClick(lParam, bHandled))
return TRUE;
/* Let the clock handle the double click */ /* Let the clock handle the double click */
::SendMessageW(m_TrayNotify, uMsg, wParam, lParam); ::SendMessageW(m_TrayNotify, uMsg, wParam, lParam);
@ -3049,6 +3043,14 @@ HandleTrayContextMenu:
return TRUE; return TRUE;
} }
LRESULT OnNcLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if (CheckShowDesktopButtonClick(lParam, bHandled))
return 0;
return 0;
}
LRESULT OnAppTrayDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) LRESULT OnAppTrayDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{ {
DestroyWindow(); DestroyWindow();
@ -3423,6 +3425,7 @@ HandleTrayContextMenu:
MESSAGE_HANDLER(WM_SYSCHAR, OnSysChar) MESSAGE_HANDLER(WM_SYSCHAR, OnSysChar)
MESSAGE_HANDLER(WM_NCRBUTTONUP, OnNcRButtonUp) MESSAGE_HANDLER(WM_NCRBUTTONUP, OnNcRButtonUp)
MESSAGE_HANDLER(WM_NCLBUTTONDBLCLK, OnNcLButtonDblClick) MESSAGE_HANDLER(WM_NCLBUTTONDBLCLK, OnNcLButtonDblClick)
MESSAGE_HANDLER(WM_NCLBUTTONUP, OnNcLButtonUp)
MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove) MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
MESSAGE_HANDLER(WM_NCMOUSEMOVE, OnMouseMove) MESSAGE_HANDLER(WM_NCMOUSEMOVE, OnMouseMove)
MESSAGE_HANDLER(WM_APP_TRAYDESTROY, OnAppTrayDestroy) MESSAGE_HANDLER(WM_APP_TRAYDESTROY, OnAppTrayDestroy)