diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-11-25 08:44:20 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-11-25 08:44:20 +0000 |
commit | f00de36ea0b8913f6d241c3aa9a08a7270a90450 (patch) | |
tree | 6057d1ccc6806a07237fb0af6b02afbf84bf792b | |
parent | 2a61a47e23ac122049a098ecab6ffeb3f813f263 (diff) |
src/main.c: win32: check for the TaskbarCreated message and reshow icon when explorer.exe crashes.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3297 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/main.c | 24 |
2 files changed, 29 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2013-11-25 + + * src/main.c: win32: check for the TaskbarCreated message and reshow + icon when explorer.exe crashes. + 2013-10-30 * src/vcard.c @@ -1144,6 +1144,11 @@ static void set_log_handlers(gboolean enable) } #ifdef G_OS_WIN32 + +#if !GTK_CHECK_VERSION(2, 14, 0) +static UINT taskbar_created_msg; +#endif + static BOOL WINAPI ctrl_handler(DWORD dwctrltype) { @@ -1176,6 +1181,21 @@ wndproc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) } break; default: +#if !GTK_CHECK_VERSION(2, 14, 0) + if (message == taskbar_created_msg) { + debug_print("TaskbarCreated received\n"); + + /* recreate tray icon */ + { + MainWindow *mainwin = main_window_get(); + if (mainwin && mainwin->tray_icon && + gtk_status_icon_get_visible(mainwin->tray_icon->status_icon)) { + trayicon_hide(mainwin->tray_icon); + trayicon_show(mainwin->tray_icon); + } + } + } +#endif break; } @@ -1200,6 +1220,10 @@ static void register_system_events(void) if (hwnd) return; +#if !GTK_CHECK_VERSION(2, 14, 0) + taskbar_created_msg = RegisterWindowMessage("TaskbarCreated"); +#endif + debug_print("register_system_events(): RegisterClass\n"); memset(&wclass, 0, sizeof(WNDCLASS)); |