Show
Ignore:
Timestamp:
01/12/06 01:20:21 (3 years ago)
Author:
hipplej
Message:

Fixed the tray icon bug in Win32, for now. Problem was in sysUpdateIcon, fixed using updated code found in patch for Psi.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/tray/trayicon_win.cpp

    r41 r65  
    291291TrayIcon::sysUpdateIcon() 
    292292{ 
    293   if (d) { 
    294     if (d->hMask) { 
    295       ptrDeleteObject( d->hMask ); 
    296       d->hMask = 0; // michalj 
    297     } 
    298     if (d->hIcon) { 
    299       DestroyIcon(d->hIcon); 
     293  if ( d ) { 
     294    if ( d->hMask ) 
     295      if ( d->hMask ) { 
     296        ptrDeleteObject( d->hMask ); 
     297        if ( d->hIcon ) { 
     298          d->hMask = 0; // michalj 
     299        } 
     300      } 
     301    if ( d->hIcon ) { 
     302      DestroyIcon( d->hIcon ); 
    300303      d->hIcon = 0; // michalj 
    301304    } 
    302  
    303     d->hIcon = createIcon(pm, d->hMask); 
    304     d->trayMessage(NIM_MODIFY); 
     305     
     306    d->hMask = createIconMask( pm ); 
     307                d->hIcon = createIcon( pm, d->hMask ); 
     308                d->trayMessage( NIM_MODIFY ); 
    305309  } 
    306310}