[PATCH v3 2/3] msi: Disable parent dialogs while modal dialog is open

Hans Leidekker hans at codeweavers.com
Mon Sep 13 04:45:00 CDT 2021


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 <dark.shadow4 at web.de>
> ---
> 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?







More information about the wine-devel mailing list