diff options
Diffstat (limited to '')
-rw-r--r-- | CPP/7zip/UI/FileManager/FM.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/CPP/7zip/UI/FileManager/FM.cpp b/CPP/7zip/UI/FileManager/FM.cpp index fe4f2bd..7310802 100644 --- a/CPP/7zip/UI/FileManager/FM.cpp +++ b/CPP/7zip/UI/FileManager/FM.cpp | |||
@@ -63,8 +63,8 @@ bool g_LargePagesMode = false; | |||
63 | static bool g_Maximized = false; | 63 | static bool g_Maximized = false; |
64 | 64 | ||
65 | extern | 65 | extern |
66 | UInt64 g_RAM_Size; | 66 | size_t g_RAM_Size; |
67 | UInt64 g_RAM_Size; | 67 | size_t g_RAM_Size; |
68 | 68 | ||
69 | #ifdef _WIN32 | 69 | #ifdef _WIN32 |
70 | extern | 70 | extern |
@@ -1025,8 +1025,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) | |||
1025 | break; | 1025 | break; |
1026 | } | 1026 | } |
1027 | 1027 | ||
1028 | case WM_DESTROY: | 1028 | case WM_CLOSE: |
1029 | { | 1029 | { |
1030 | // why do we use WA_INACTIVE here ? | ||
1031 | SendMessage(hWnd, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), (LPARAM)hWnd); | ||
1032 | g_ExitEventLauncher.Exit(false); | ||
1030 | // ::DragAcceptFiles(hWnd, FALSE); | 1033 | // ::DragAcceptFiles(hWnd, FALSE); |
1031 | RevokeDragDrop(hWnd); | 1034 | RevokeDragDrop(hWnd); |
1032 | g_App._dropTarget.Release(); | 1035 | g_App._dropTarget.Release(); |
@@ -1034,12 +1037,18 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) | |||
1034 | if (g_WindowWasCreated) | 1037 | if (g_WindowWasCreated) |
1035 | g_App.Save(); | 1038 | g_App.Save(); |
1036 | 1039 | ||
1037 | g_App.Release(); | 1040 | g_App.ReleaseApp(); |
1038 | 1041 | ||
1039 | if (g_WindowWasCreated) | 1042 | if (g_WindowWasCreated) |
1040 | SaveWindowInfo(hWnd); | 1043 | SaveWindowInfo(hWnd); |
1041 | 1044 | ||
1042 | g_ExitEventLauncher.Exit(true); | 1045 | g_ExitEventLauncher.Exit(true); |
1046 | // default DefWindowProc will call DestroyWindow / WM_DESTROY | ||
1047 | break; | ||
1048 | } | ||
1049 | |||
1050 | case WM_DESTROY: | ||
1051 | { | ||
1043 | PostQuitMessage(0); | 1052 | PostQuitMessage(0); |
1044 | break; | 1053 | break; |
1045 | } | 1054 | } |