Changeset 951 for trunk/src/3rdparty/os2/xsystray/plugin/w_xsystray.c
- Timestamp:
- Aug 9, 2011, 10:34:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/3rdparty/os2/xsystray/plugin/w_xsystray.c
r842 r951 828 828 break; 829 829 830 DrawPointer(hps, x, y, pSysTrayData->pIcons[i].hIcon, DP_MINI); 830 // just leave an empty box if the icon is NULL, this is what 831 // Windows and Linux tray widgets do 832 if (pSysTrayData->pIcons[i].hIcon != NULLHANDLE) 833 DrawPointer(hps, x, y, pSysTrayData->pIcons[i].hIcon, DP_MINI); 831 834 x += lIconStep; 832 835 } … … 1210 1213 // make a private copy of the provided icon (it will get lost after 1211 1214 // we return from this message) 1212 brc = WinQueryPointerInfo(pCtlData->u.icon.hIcon, &Info); 1213 if (!brc) 1214 break; 1215 hIcon = WinCreatePointerIndirect(HWND_DESKTOP, &Info); 1216 if (hIcon == NULLHANDLE) 1217 break; 1215 if (pCtlData->u.icon.hIcon != NULLHANDLE) 1216 { 1217 brc = WinQueryPointerInfo(pCtlData->u.icon.hIcon, &Info); 1218 if (!brc) 1219 break; 1220 hIcon = WinCreatePointerIndirect(HWND_DESKTOP, &Info); 1221 if (hIcon == NULLHANDLE) 1222 break; 1223 } 1218 1224 1219 1225 pData = FindIconData(pSysTrayData, pCtlData->hwndSender, … … 1231 1237 if (!pData->pszToolTip) 1232 1238 { 1233 WinDestroyPointer(hIcon); 1239 if (hIcon != NULLHANDLE) 1240 WinDestroyPointer(hIcon); 1234 1241 break; 1235 1242 } … … 1251 1258 1252 1259 // now update the icon 1253 WinDestroyPointer(pData->hIcon); 1260 if (pData->hIcon != NULLHANDLE) 1261 WinDestroyPointer(pData->hIcon); 1254 1262 pData->hIcon = hIcon; 1255 1263 pData->ulMsgId = pCtlData->u.icon.ulMsgId; … … 1276 1284 if (pNewIcons == NULL) 1277 1285 { 1278 WinDestroyPointer(hIcon); 1286 if (hIcon != NULLHANDLE) 1287 WinDestroyPointer(hIcon); 1279 1288 break; 1280 1289 } … … 1299 1308 if (!pData->pszToolTip) 1300 1309 { 1301 WinDestroyPointer(hIcon); 1310 if (hIcon != NULLHANDLE) 1311 WinDestroyPointer(hIcon); 1302 1312 break; 1303 1313 } … … 1328 1338 // make a private copy of the provided icon (it will get lost after 1329 1339 // we return from this message) 1330 brc = WinQueryPointerInfo(pCtlData->u.icon.hIcon, &Info); 1331 if (!brc) 1332 break; 1333 hIcon = WinCreatePointerIndirect(HWND_DESKTOP, &Info); 1334 if (hIcon == NULLHANDLE) 1335 break; 1340 if (pCtlData->u.icon.hIcon != NULLHANDLE) 1341 { 1342 brc = WinQueryPointerInfo(pCtlData->u.icon.hIcon, &Info); 1343 if (!brc) 1344 break; 1345 hIcon = WinCreatePointerIndirect(HWND_DESKTOP, &Info); 1346 if (hIcon == NULLHANDLE) 1347 break; 1348 } 1336 1349 1337 1350 pData = FindIconData(pSysTrayData, pCtlData->hwndSender, … … 1341 1354 LOGF((" Replacing with hIcon %x\n", hIcon)); 1342 1355 1343 WinDestroyPointer(pData->hIcon); 1356 if (pData->hIcon != NULLHANDLE) 1357 WinDestroyPointer(pData->hIcon); 1344 1358 pData->hIcon = hIcon; 1345 1359 pData->ulMsgId = pCtlData->u.icon.ulMsgId;
Note:
See TracChangeset
for help on using the changeset viewer.