mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +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;
|
HWND tray;
|
||||||
COPYDATASTRUCT cds;
|
COPYDATASTRUCT cds;
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
|
BOOL ret;
|
||||||
|
|
||||||
TRACE("dwMessage = %d, nid->cbSize=%d\n", dwMessage, nid->cbSize);
|
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);
|
GetBitmapBits(iconinfo.hbmMask, cbMaskBits, buffer);
|
||||||
buffer += cbMaskBits;
|
buffer += cbMaskBits;
|
||||||
GetBitmapBits(iconinfo.hbmColor, cbColourBits, buffer);
|
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.hbmMask);
|
||||||
DeleteObject(iconinfo.hbmColor);
|
DeleteObject(iconinfo.hbmColor);
|
||||||
|
@ -181,11 +186,11 @@ noicon:
|
||||||
cds.lpData = nid;
|
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
|
/* FIXME: if statement only needed because we don't support interprocess
|
||||||
* icon handles */
|
* icon handles */
|
||||||
HeapFree(GetProcessHeap(), 0, buffer);
|
HeapFree(GetProcessHeap(), 0, buffer);
|
||||||
|
|
||||||
return TRUE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue