comparison src/win32/systray.c @ 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 fb0a5b872e6a
children afe9e1f0b9b0
comparison
equal deleted inserted replaced
5388:5d0df915ca09 5389:3a4b9b057825
190 do_away_message(NULL, a); 190 do_away_message(NULL, a);
191 } 191 }
192 } 192 }
193 193
194 static LRESULT CALLBACK systray_mainmsg_handler(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { 194 static LRESULT CALLBACK systray_mainmsg_handler(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
195 static UINT taskbarRestartMsg; /* static here means value is kept across multiple calls to this func */
195 196
196 switch(msg) { 197 switch(msg) {
197 case WM_CREATE: 198 case WM_CREATE:
198 debug_printf("WM_CREATE\n"); 199 debug_printf("WM_CREATE\n");
200 taskbarRestartMsg = RegisterWindowMessage("TaskbarCreated");
199 break; 201 break;
200 202
201 case WM_TIMER: 203 case WM_TIMER:
202 debug_printf("WM_TIMER\n"); 204 debug_printf("WM_TIMER\n");
203 break; 205 break;
267 systray_show_menu(mpoint.x, mpoint.y, 1); 269 systray_show_menu(mpoint.x, mpoint.y, 1);
268 } 270 }
269 } 271 }
270 break; 272 break;
271 } 273 }
272 default: 274 default:
275 if (msg == taskbarRestartMsg) {
276 /* explorer crashed and left us hanging...
277 This will put the systray icon back in it's place, when it restarts */
278 Shell_NotifyIcon(NIM_ADD,&wgaim_nid);
279 }
280 break;
273 }/* end switch */ 281 }/* end switch */
274 282
275 return DefWindowProc(hwnd, msg, wparam, lparam); 283 return DefWindowProc(hwnd, msg, wparam, lparam);
276 } 284 }
277 285