diff options
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r-- | src/Common/Dlgcode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index cc368df5..001d7102 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c | |||
@@ -7372,16 +7372,16 @@ void ShowWaitDialog(HWND hwnd, BOOL bUseHwndAsParent, WaitThreadProc callback, v | |||
7372 | else | 7372 | else |
7373 | { | 7373 | { |
7374 | BOOL bIsForeground = FALSE; | 7374 | BOOL bIsForeground = FALSE; |
7375 | HWND creatorWnd = hwnd? hwnd : MainDlg; | ||
7375 | WaitDialogDisplaying = TRUE; | 7376 | WaitDialogDisplaying = TRUE; |
7376 | if (hwnd) | 7377 | if (creatorWnd) |
7377 | { | 7378 | { |
7378 | if (GetForegroundWindow () == hwnd) | 7379 | if (GetForegroundWindow () == creatorWnd) |
7379 | bIsForeground = TRUE; | 7380 | bIsForeground = TRUE; |
7380 | EnableWindow (hwnd, FALSE); | 7381 | EnableWindow (creatorWnd, FALSE); |
7381 | } | 7382 | } |
7382 | else | 7383 | |
7383 | EnableWindow (MainDlg, FALSE); | 7384 | finally_do_arg2 (HWND, creatorWnd, BOOL, bIsForeground, { if (finally_arg) { EnableWindow(finally_arg, TRUE); if (finally_arg2) BringToForeground (finally_arg);}}); |
7384 | finally_do_arg2 (HWND, hwnd, BOOL, bIsForeground, { if (finally_arg) {EnableWindow(finally_arg, TRUE); if (finally_arg2) BringToForeground (finally_arg);} else EnableWindow (MainDlg, TRUE);}); | ||
7385 | 7385 | ||
7386 | DialogBoxParamW (hInst, | 7386 | DialogBoxParamW (hInst, |
7387 | MAKEINTRESOURCEW (IDD_STATIC_MODAL_WAIT_DLG), hParent, | 7387 | MAKEINTRESOURCEW (IDD_STATIC_MODAL_WAIT_DLG), hParent, |