Mercurial > pidgin.yaz
changeset 5389:3a4b9b057825
[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 <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Thu, 15 May 2003 23:59:20 +0000 |
parents | 5d0df915ca09 |
children | 067567d2e55e |
files | src/win32/systray.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);