Changeset 285


Ignore:
Timestamp:
Nov 3, 2009, 3:58:20 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

3rdparty: os2/xsystray: Implemented xstQuerySysTrayIconRect() API call. Fixed the regression of the previous checkin (icons wouldn't be removed when the associated application crashed).

Location:
trunk/src/3rdparty/os2/xsystray
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/3rdparty/os2/xsystray/xsystray.c

    r282 r285  
    735735 *      to left.
    736736 *
    737  *      NOTE: This function must be keept in sync with FindIconDataAtPt() in
    738  *      terms of system tray geometry.
     737 *      NOTE: This function must be keept in sync with FindIconDataAtPt()
     738 *      terms of system tray geometry.
    739739 */
    740740/*
     
    13111311                }
    13121312
     1313
     1314
    13131315                WgtXSysTrayUpdateAfterIconAddRemove(pWidget);
    1314 
    1315                 ++pSysTrayData->cIcons;
    13161316
    13171317                xrc = XST_OK;
     
    14391439                }
    14401440
     1441
     1442
     1443
     1444
     1445
     1446
     1447
     1448
     1449
     1450
     1451
     1452
     1453
     1454
     1455
     1456
     1457
     1458
     1459
     1460
     1461
     1462
     1463
     1464
     1465
     1466
     1467
     1468
     1469
     1470
     1471
     1472
     1473
     1474
     1475
     1476
     1477
     1478
     1479
     1480
     1481
     1482
     1483
     1484
     1485
     1486
     1487
     1488
     1489
     1490
     1491
     1492
     1493
     1494
     1495
     1496
     1497
     1498
     1499
     1500
     1501
     1502
    14411503                xrc = XST_OK;
    14421504            }
  • trunk/src/3rdparty/os2/xsystray/xsystray.h

    r282 r285  
    5252    SYSTRAYCMD_SHOWBALLOON,
    5353    SYSTRAYCMD_HIDEBALLOON,
     54
    5455} SYSTRAYCMD;
    5556
     
    7677    HWND        hwndSender;
    7778                // sender window, a must for SYSTRAYCMD_ADDICON, _CHANGEICON,
    78                 // _REMOVEICON, _SETTOOLTIP, _SHOWBALLOON, _HIDEBALLOON
     79                // _REMOVEICON, _SETTOOLTIP, _SHOWBALLOON, _HIDEBALLOON,
     80                // _QUERYRECT
    7981    union
    8082    {
     
    9597        } icon;
    9698          // used by SYSTRAYCMD_ADDICON, _CHANGEICON, _REMOVEICON, _SETTOOLTIP
     99
     100
     101
     102
     103
     104
    97105    } u;
    98106
  • trunk/src/3rdparty/os2/xsystray/xsystray_api.c

    r282 r285  
    569569    pData->u.icon.usId = usId;
    570570
    571 
    572571    if (!pcszToolTip)
    573572        pData->u.icon.szToolTip[0] = '\0';
     
    610609BOOL xstQuerySysTrayIconRect(HWND hwnd, USHORT usId, PRECTL prclRect)
    611610{
    612     // @todo implement
    613     return FALSE;
     611    BOOL brc;
     612    PSYSTRAYCTLDATA pData = AllocSysTrayCtlDataPtr();
     613    if (!pData)
     614        return FALSE;
     615
     616    pData->ulCommand = SYSTRAYCMD_QUERYRECT;
     617    pData->hwndSender = hwnd;
     618    pData->u.icon.usId = usId;
     619
     620    brc = SendSysTrayCtlMsg(pData) == XST_OK;
     621    if (brc)
     622    {
     623        *prclRect = pData->u.rect.rclIcon;
     624    }
     625
     626    FreeSysTrayCtlDataPtr(pData);
     627
     628    return brc;
    614629}
    615630
Note: See TracChangeset for help on using the changeset viewer.