From 75ccf352d41660db127aa8eaa494569ae25faa97 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Fri, 31 Aug 2012 21:11:27 +0000 Subject: [PATCH] [BUG_FiXED] (Author: Andreas Jonsson) Fix a behavior issue on Windows shutdown. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@949 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/NppBigSwitch.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 3ea57347..e18835fe 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -1465,11 +1465,18 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa saveSession(currentSession); //Sends WM_DESTROY, Notepad++ will end - ::DestroyWindow(hwnd); + if(Message == WM_CLOSE) + ::DestroyWindow(hwnd); } return TRUE; } + case WM_ENDSESSION: + { + ::DestroyWindow(hwnd); + return TRUE; + } + case WM_DESTROY: { killAllChildren();