Ignore:
Timestamp:
Aug 9, 2011, 10:34:15 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

OS/2: xsystray: Paint empty box for NULL icon.

This is what tray widgets on Windows and Linux do. Previously,
xsystray would leave an old icon if NULL icon was sent to it,
which was totally confusing.

File:
1 edited

Legend:

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

    r841 r951  
    316316
    317317    // give all processes temporary access to hIcon
    318     brc = WinSetPointerOwner(hIcon, 0, FALSE);
     318    brc = ;
    319319    if (brc)
    320320    {
     
    340340
    341341        // revoke temporary access to hIcon
    342         DosGetInfoBlocks(NULL, &ppib);
    343         WinSetPointerOwner(hIcon, ppib->pib_ulpid, TRUE);
     342        if (hIcon != NULLHANDLE)
     343        {
     344            DosGetInfoBlocks(NULL, &ppib);
     345            WinSetPointerOwner(hIcon, ppib->pib_ulpid, TRUE);
     346        }
    344347    }
    345348
     
    402405
    403406    // give all processes temporary access to hIcon
    404     brc = WinSetPointerOwner(hIcon, 0, FALSE);
     407    brc = ;
    405408    if (brc)
    406409    {
     
    414417
    415418        // revoke temporary access to hIcon
    416         DosGetInfoBlocks(NULL, &ppib);
    417         WinSetPointerOwner(hIcon, ppib->pib_ulpid, TRUE);
     419        if (hIcon != NULLHANDLE)
     420        {
     421            DosGetInfoBlocks(NULL, &ppib);
     422            WinSetPointerOwner(hIcon, ppib->pib_ulpid, TRUE);
     423        }
    418424    }
    419425
Note: See TracChangeset for help on using the changeset viewer.