- Timestamp:
- Mar 15, 2011, 4:34:07 PM (14 years ago)
- Location:
- trunk/src/shell32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/systray.c
r10604 r21590 78 78 SYSTRAY_ItemSetTip (*ptrayItem, (pnid->uFlags&NIF_TIP) ?pnid->szTip :"", FALSE); 79 79 80 TRACE("SYSTRAY_Add %p: 0x%08x 0x%08x 0x%08x %s\n", (*ptrayItem), (*ptrayItem)->notifyIcon.hWnd, 80 TRACE("SYSTRAY_Add %p: 0x%08x 0x%08x 0x%08x 0x%08x %s\n", (*ptrayItem), 81 (*ptrayItem)->notifyIcon.hWnd, (*ptrayItem)->notifyIcon.hIcon, 81 82 pnid->uCallbackMessage, (*ptrayItem)->notifyIcon.uCallbackMessage, 82 83 pnid->szTip ); -
trunk/src/shell32/systray_os2.c
r10604 r21590 154 154 void SYSTRAY_ItemTerm(SystrayItem *ptrayItem) 155 155 { 156 HPOINTER hIcon = (HPOINTER)WinSendMsg(ptrayItem->hWndFrame, WM_QUERYICON, NULL, NULL); 157 if (hIcon != NULLHANDLE) 158 WinDestroyPointer(hIcon); 159 156 160 WinDestroyWindow(ptrayItem->hWndFrame); 157 161 } … … 166 170 void SYSTRAY_ItemSetIcon(SystrayItem *ptrayItem, HPOINTER hIcon) 167 171 { 172 // Windows seems to make a copy of icons displayed in the tray area. At 173 // least, calling DestroyIcon() after passing the icon handle to 174 // Shell_NotifyIcon() doesn't harm the icon displayed in the tray. Behave 175 // similarly on OS/2 (some applications do call DestroyIcon()). The copy is 176 // deleted in SYSTRAY_ItemTerm(). 177 178 POINTERINFO Info; 179 HPOINTER hIcon2 = NULLHANDLE; 180 APIRET arc; 181 arc = WinQueryPointerInfo(hIcon, &Info); 182 if (!arc) 183 return; 184 hIcon2 = WinCreatePointerIndirect(HWND_DESKTOP, &Info); 185 if (hIcon2 == NULLHANDLE) 186 return; 187 hIcon = hIcon2; 188 168 189 WinSendMsg( ptrayItem->hWndFrame, WM_SETICON, MPFROMLONG( hIcon ), MPVOID ); 169 190 if (hwndTrayServer)
Note:
See TracChangeset
for help on using the changeset viewer.