From: Fabian Maurer Subject: [PATCH v3 2/3] msi: Disable parent dialogs while modal dialog is open Message-Id: <20210911235700.9410-2-dark.shadow4@web.de> Date: Sun, 12 Sep 2021 01:56:59 +0200 In-Reply-To: <20210911235700.9410-1-dark.shadow4@web.de> References: <20210911235700.9410-1-dark.shadow4@web.de> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51717 Signed-off-by: Fabian Maurer --- v3: Add missing call to SetForegroundWindow --- dlls/msi/dialog.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 6463c3062ac..a99a9076946 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -3881,6 +3881,11 @@ static LRESULT WINAPI MSIDialog_WndProc( HWND hwnd, UINT msg, return SendMessageW( (HWND) lParam, WM_CTLCOLORSTATIC, wParam, lParam ); case WM_DESTROY: + if (dialog->parent) + { + EnableWindow(dialog->parent->hwnd, TRUE); + SetForegroundWindow(dialog->parent->hwnd); + } dialog->hwnd = NULL; return 0; case WM_NOTIFY: @@ -3928,6 +3933,11 @@ static UINT dialog_run_message_loop( msi_dialog *dialog ) return ERROR_FUNCTION_FAILED; } + if (parent) + { + EnableWindow(parent, FALSE); + } + ShowWindow( hwnd, SW_SHOW ); /* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */ -- 2.33.0