# HG changeset patch # User Herman Bloggs # Date 1053043160 0 # Node ID 3a4b9b0578251e28e031da7f1b870ed8497a5054 # Parent 5d0df915ca09c71f209588aca846d463dc26498b [gaim-migrate @ 5765] fix for disappearing systray icon when explorer crashes. Thanks again to phroggie.. this is turning into a Phroggie-thon committer: Tailor Script diff -r 5d0df915ca09 -r 3a4b9b057825 src/win32/systray.c --- a/src/win32/systray.c Thu May 15 21:43:42 2003 +0000 +++ b/src/win32/systray.c Thu May 15 23:59:20 2003 +0000 @@ -192,10 +192,12 @@ } static LRESULT CALLBACK systray_mainmsg_handler(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { + static UINT taskbarRestartMsg; /* static here means value is kept across multiple calls to this func */ switch(msg) { case WM_CREATE: debug_printf("WM_CREATE\n"); + taskbarRestartMsg = RegisterWindowMessage("TaskbarCreated"); break; case WM_TIMER: @@ -269,7 +271,13 @@ } break; } - default: + default: + if (msg == taskbarRestartMsg) { + /* explorer crashed and left us hanging... + This will put the systray icon back in it's place, when it restarts */ + Shell_NotifyIcon(NIM_ADD,&wgaim_nid); + } + break; }/* end switch */ return DefWindowProc(hwnd, msg, wparam, lparam);