mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
sync Shell_NotifyIconW with wine 1.1.7
svn path=/trunk/; revision=37017
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user