mirror of
https://github.com/reactos/reactos.git
synced 2025-01-08 12:43:29 +08:00
[EXPLORER] Improve CTrayWindow::OnCopyData (#3028)
Check pCopyData->dwData value. Don't send message needlessly. CORE-7237
This commit is contained in:
parent
8d682f9b05
commit
1c40070561
@ -1531,8 +1531,6 @@ LRESULT CSysPagerWnd::OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHa
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT appbar_message( COPYDATASTRUCT* cds );
|
||||
|
||||
LRESULT CSysPagerWnd::OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
PCOPYDATASTRUCT cpData = (PCOPYDATASTRUCT)lParam;
|
||||
@ -1543,11 +1541,6 @@ LRESULT CSysPagerWnd::OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
|
||||
if (pData->dwSignature == NI_NOTIFY_SIG)
|
||||
return NotifyIcon(pData->dwMessage, &pData->nid);
|
||||
}
|
||||
else if (cpData->dwData == TABDMC_APPBAR)
|
||||
{
|
||||
FIXME("Taskbar Tray Application Bar\n");
|
||||
return appbar_message( cpData );
|
||||
}
|
||||
else if (cpData->dwData == TABDMC_LOADINPROC)
|
||||
{
|
||||
FIXME("Taskbar Load In Proc\n");
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <commoncontrols.h>
|
||||
|
||||
HRESULT TrayWindowCtxMenuCreator(ITrayWindow * TrayWnd, IN HWND hWndOwner, IContextMenu ** ppCtxMenu);
|
||||
LRESULT appbar_message(COPYDATASTRUCT* cds);
|
||||
|
||||
#define WM_APP_TRAYDESTROY (WM_APP + 0x100)
|
||||
|
||||
@ -2197,7 +2198,6 @@ ChangePos:
|
||||
return m_ContextMenu->GetCommandString(idCmd, uType, pwReserved, pszName, cchMax);
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************
|
||||
* ##### message handling #####
|
||||
*/
|
||||
@ -2341,9 +2341,16 @@ ChangePos:
|
||||
|
||||
LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
if (m_TrayNotify)
|
||||
::SendMessageW(m_TrayNotify, uMsg, wParam, lParam);
|
||||
return TRUE;
|
||||
COPYDATASTRUCT *pCopyData = reinterpret_cast<COPYDATASTRUCT *>(lParam);
|
||||
switch (pCopyData->dwData)
|
||||
{
|
||||
case TABDMC_APPBAR:
|
||||
return appbar_message(pCopyData);
|
||||
case TABDMC_NOTIFY:
|
||||
case TABDMC_LOADINPROC:
|
||||
return ::SendMessageW(m_TrayNotify, uMsg, wParam, lParam);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
|
Loading…
Reference in New Issue
Block a user