Commit 2c268318 authored by James Hatheway's avatar James Hatheway Committed by Alexandre Julliard

Systray should keep a copy of its icons.

parent 7a0f96c9
...@@ -207,6 +207,8 @@ BOOL SYSTRAY_ItemInit(SystrayItem *ptrayItem) ...@@ -207,6 +207,8 @@ BOOL SYSTRAY_ItemInit(SystrayItem *ptrayItem)
static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem) static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem)
{ {
if(ptrayItem->notifyIcon.hIcon)
DestroyIcon(ptrayItem->notifyIcon.hIcon);
if(ptrayItem->hWndToolTip) if(ptrayItem->hWndToolTip)
DestroyWindow(ptrayItem->hWndToolTip); DestroyWindow(ptrayItem->hWndToolTip);
if(ptrayItem->hWnd) if(ptrayItem->hWnd)
...@@ -223,7 +225,7 @@ void SYSTRAY_ItemSetMessage(SystrayItem *ptrayItem, UINT uCallbackMessage) ...@@ -223,7 +225,7 @@ void SYSTRAY_ItemSetMessage(SystrayItem *ptrayItem, UINT uCallbackMessage)
void SYSTRAY_ItemSetIcon(SystrayItem *ptrayItem, HICON hIcon) 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); InvalidateRect(ptrayItem->hWnd, NULL, TRUE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment