1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: Don't close Setup when exiting VeraCrypt process through system tray Exit menu

This commit is contained in:
Mounir IDRASSI
2023-10-11 22:09:09 +02:00
parent 06b3095e20
commit bfd1abcabb

View File

@@ -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);