mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
sync Shell_NotifyIconW with wine 1.1.7
svn path=/trunk/; revision=37017
This commit is contained in:
parent
7d97d478db
commit
09501bc1c2
1 changed files with 8 additions and 3 deletions
|
@ -104,6 +104,7 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid)
|
|||
HWND tray;
|
||||
COPYDATASTRUCT cds;
|
||||
char *buffer = NULL;
|
||||
BOOL ret;
|
||||
|
||||
TRACE("dwMessage = %d, nid->cbSize=%d\n", dwMessage, nid->cbSize);
|
||||
|
||||
|
@ -169,7 +170,11 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid)
|
|||
GetBitmapBits(iconinfo.hbmMask, cbMaskBits, buffer);
|
||||
buffer += cbMaskBits;
|
||||
GetBitmapBits(iconinfo.hbmColor, cbColourBits, buffer);
|
||||
buffer += cbColourBits;
|
||||
|
||||
/* Reset pointer to allocated block so it can be freed later.
|
||||
* Note that cds.lpData cannot be passed to HeapFree since it
|
||||
* points to nid when no icon info is found. */
|
||||
buffer = cds.lpData;
|
||||
|
||||
DeleteObject(iconinfo.hbmMask);
|
||||
DeleteObject(iconinfo.hbmColor);
|
||||
|
@ -181,11 +186,11 @@ noicon:
|
|||
cds.lpData = nid;
|
||||
}
|
||||
|
||||
SendMessageW(tray, WM_COPYDATA, (WPARAM)nid->hWnd, (LPARAM)&cds);
|
||||
ret = SendMessageW(tray, WM_COPYDATA, (WPARAM)nid->hWnd, (LPARAM)&cds);
|
||||
|
||||
/* FIXME: if statement only needed because we don't support interprocess
|
||||
* icon handles */
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
|
||||
return TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue