From: Hans Leidekker Subject: Re: [PATCH v3 2/3] msi: Disable parent dialogs while modal dialog is open Message-Id: <8ecc128cc93cb4d4982cc80b45a9c6e4035d2bdb.camel@codeweavers.com> Date: Mon, 13 Sep 2021 11:45:00 +0200 In-Reply-To: <20210911235700.9410-2-dark.shadow4@web.de> References: <20210911235700.9410-1-dark.shadow4@web.de> <20210911235700.9410-2-dark.shadow4@web.de> On Sun, 2021-09-12 at 01:56 +0200, Fabian Maurer wrote: > 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); > + } > + Should this be done only for dialogs with the msidbDialogAttributesModal attribute set, as suggested by the patch description?