VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-10-11 22:09:09 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-10-11 22:09:09 +0200
commitbfd1abcabb13d931cdc81387c9760a7fae483f18 (patch)
tree5565c23af6ec719f7a90d4c225d8d87fcded721e
parent06b3095e205b542847de17f10d132bfff78260f3 (diff)
downloadVeraCrypt-bfd1abcabb13d931cdc81387c9760a7fae483f18.tar.gz
VeraCrypt-bfd1abcabb13d931cdc81387c9760a7fae483f18.zip
Windows: Don't close Setup when exiting VeraCrypt process through system tray Exit menu
-rw-r--r--src/Common/Dlgcode.c3
1 files changed, 2 insertions, 1 deletions
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);