diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-12-21 04:42:43 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-12-21 04:42:43 +0000 |
commit | 7ee61ac93843da9fc485a5b67fdacba2063523fc (patch) | |
tree | 78ba4a6e9aa6261067bd34783b473c47d7a0ed11 /src | |
parent | 18dff216d322665e02f68e810d1beaff4e4020d1 (diff) |
win32: call app_will_exit() when WM_ENDSESSION is received.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1932 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -970,7 +970,8 @@ static void set_log_handlers(gboolean enable) static LRESULT CALLBACK wndproc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { - if (message == WM_POWERBROADCAST) { + switch (message) { + case WM_POWERBROADCAST: debug_print("WM_POWERBROADCAST received: wparam = %d\n", wparam); if (wparam == PBT_APMSUSPEND || wparam == PBT_APMSTANDBY) { @@ -981,6 +982,15 @@ wndproc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) debug_print("resume now\n"); inc_autocheck_timer_set(); } + break; + case WM_ENDSESSION: + if (wparam == 1) { + log_print("WM_ENDSESSION received: system is quitting\n"); + app_will_exit(TRUE); + } + break; + default: + break; } return DefWindowProc(hwnd, message, wparam, lparam); |