close installer on WM_QUERYENDSESSION instead of trying to clean up on WM_ENDSESSION which doesn't work if there's an active plug-in (for example, when the finish page is showing)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3596 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-08-06 16:47:19 +00:00
parent cbd1b0427c
commit 7270abe8d3

View file

@ -577,7 +577,7 @@ skipPage:
m_curwnd = (HWND)wParam;
goto skipPage;
}
if (uMsg == WM_CLOSE && m_page == g_blocks[NB_PAGES].num - 1)
if (uMsg == WM_QUERYENDSESSION || (uMsg == WM_CLOSE && m_page == g_blocks[NB_PAGES].num - 1))
{
if (!IsWindowEnabled(m_hwndCancel))
{
@ -632,11 +632,6 @@ skipPage:
SendMessage(m_curwnd, WM_COMMAND, wParam, lParam);
}
}
if (uMsg == WM_ENDSESSION && wParam)
{
// the session can end any time after we process this message so we better clean up now
CleanUp();
}
return HandleStaticBkColor();
}