[PATCH v2] msi: Set first dialog as parent in subsequent dialogs

Hans Leidekker hans at codeweavers.com
Thu Aug 26 04:25:49 CDT 2021


On Mon, 2021-08-09 at 19:39 +0200, Fabian Maurer wrote:
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51576
> Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
> ---
>  dlls/msi/dialog.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
> index 703f9d43957..1c85ee00761 100644
> --- a/dlls/msi/dialog.c
> +++ b/dlls/msi/dialog.c
> @@ -139,6 +139,7 @@ typedef struct
> 
>  static DWORD uiThreadId;
>  static HWND hMsiHiddenWindow;
> +static HWND handle_main_dialog = NULL;
> 
>  static LPWSTR msi_get_window_text( HWND hwnd )
>  {
> @@ -3881,6 +3882,8 @@ static LRESULT WINAPI MSIDialog_WndProc( HWND hwnd, UINT msg,
>          return SendMessageW( (HWND) lParam, WM_CTLCOLORSTATIC, wParam, lParam );
> 
>      case WM_DESTROY:
> +        if (dialog->hwnd == handle_main_dialog)
> +            handle_main_dialog = NULL;
>          dialog->hwnd = NULL;
>          return 0;
>      case WM_NOTIFY:
> @@ -3919,13 +3922,16 @@ static UINT dialog_run_message_loop( msi_dialog *dialog )
> 
>      hwnd = CreateWindowW( L"MsiDialogCloseClass", dialog->name, style,
>                       CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
> -                     NULL, NULL, NULL, dialog );
> +                     handle_main_dialog, NULL, NULL, dialog );

This doesn't seem to match Windows behavior.





More information about the wine-devel mailing list