From 89a7fad16d06b271dab13f8c63dfaa95dbdf398b Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 11 Sep 2015 00:25:23 +0200 Subject: Windows: avoid freezing the wait dialog by setting its parent to desktop when having lengthy driver calls (like mounting) --- src/Common/Dlgcode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Common') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index ef3b5662..a5bad787 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -6606,6 +6606,11 @@ void ShowWaitDialog(HWND hwnd, BOOL bUseHwndAsParent, WaitThreadProc callback, v else { WaitDialogDisplaying = TRUE; + if (hwnd) + EnableWindow (hwnd, FALSE); + else + EnableWindow (MainDlg, FALSE); + finally_do_arg (HWND, hwnd, { if (finally_arg) EnableWindow(finally_arg, TRUE); else EnableWindow (MainDlg, TRUE);}); DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_STATIC_MODAL_WAIT_DLG), hParent, @@ -7084,7 +7089,7 @@ retry: } else { - ShowWaitDialog (hwndDlg, TRUE, UnmountWaitThreadProc, ¶m); + ShowWaitDialog (hwndDlg, FALSE, UnmountWaitThreadProc, ¶m); } SetLastError (param.dwLastError); -- cgit v1.2.3