Systray should keep a copy of its icons.

oldstable
James Hatheway 2000-09-06 19:40:44 +00:00 committed by Alexandre Julliard
parent 7a0f96c908
commit 2c268318ea
1 changed files with 3 additions and 1 deletions

View File

@ -207,6 +207,8 @@ BOOL SYSTRAY_ItemInit(SystrayItem *ptrayItem)
static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem)
{
if(ptrayItem->notifyIcon.hIcon)
DestroyIcon(ptrayItem->notifyIcon.hIcon);
if(ptrayItem->hWndToolTip)
DestroyWindow(ptrayItem->hWndToolTip);
if(ptrayItem->hWnd)
@ -223,7 +225,7 @@ void SYSTRAY_ItemSetMessage(SystrayItem *ptrayItem, UINT uCallbackMessage)
void SYSTRAY_ItemSetIcon(SystrayItem *ptrayItem, HICON hIcon)
{
ptrayItem->notifyIcon.hIcon = hIcon; /* do we need a copy? */
ptrayItem->notifyIcon.hIcon = CopyIcon(hIcon);
InvalidateRect(ptrayItem->hWnd, NULL, TRUE);
}