From bfd1abcabb13d931cdc81387c9760a7fae483f18 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 11 Oct 2023 22:09:09 +0200 Subject: Windows: Don't close Setup when exiting VeraCrypt process through system tray Exit menu --- src/Common/Dlgcode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index e0ff2b2c..7ad0fdb0 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -11338,7 +11338,8 @@ BOOL CALLBACK CloseTCWindowsEnum (HWND hwnd, LPARAM lParam) { wchar_t name[1024] = { 0 }; GetWindowText (hwnd, name, ARRAYSIZE (name) - 1); - if (hwnd != MainDlg && wcsstr (name, L"VeraCrypt")) + // check if the window is a VeraCrypt window, excluding current process main dialog and VeraCrypt Setup window + if (hwnd != MainDlg && wcsstr (name, L"VeraCrypt") && !wcsstr (name, L"VeraCrypt Setup")) { PostMessage (hwnd, TC_APPMSG_CLOSE_BKG_TASK, 0, 0); -- cgit v1.2.3