From 0c5c3b18ec76226e7fc4d8a9376693be173af86e Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Fri, 17 Aug 2012 21:19:26 +0100 Subject: [PATCH] Fixed WM_CLOSE handling --- main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 2bb588e7..213a3d25 100644 --- a/main.c +++ b/main.c @@ -440,13 +440,13 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, PostMessage(hWnd, WM_NULL, 0, 0); DestroyMenu(hMenu); break; - case WM_CLOSE: - mg_stop(ctx); - Shell_NotifyIcon(NIM_DELETE, &TrayIcon); - PostQuitMessage(0); - return 0; // We've just sent our own quit message, with proper hwnd. } break; + case WM_CLOSE: + mg_stop(ctx); + Shell_NotifyIcon(NIM_DELETE, &TrayIcon); + PostQuitMessage(0); + return 0; // We've just sent our own quit message, with proper hwnd. } return DefWindowProc(hWnd, msg, wParam, lParam);