Commit 0c5c3b18 authored by Sergey Lyubka's avatar Sergey Lyubka

Fixed WM_CLOSE handling

parent 9378946e
...@@ -440,14 +440,14 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, ...@@ -440,14 +440,14 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam,
PostMessage(hWnd, WM_NULL, 0, 0); PostMessage(hWnd, WM_NULL, 0, 0);
DestroyMenu(hMenu); DestroyMenu(hMenu);
break; break;
}
break;
case WM_CLOSE: case WM_CLOSE:
mg_stop(ctx); mg_stop(ctx);
Shell_NotifyIcon(NIM_DELETE, &TrayIcon); Shell_NotifyIcon(NIM_DELETE, &TrayIcon);
PostQuitMessage(0); PostQuitMessage(0);
return 0; // We've just sent our own quit message, with proper hwnd. return 0; // We've just sent our own quit message, with proper hwnd.
} }
break;
}
return DefWindowProc(hWnd, msg, wParam, lParam); return DefWindowProc(hWnd, msg, wParam, lParam);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment