[PATCH 3/3] [RFC/WIP] msi: Show messageboxes as modal

Fabian Maurer dark.shadow4 at web.de
Fri Sep 3 13:33:26 CDT 2021


This last patch is a bit different.
It fixes an issue, but I don't know enough about msi internals to tell how correct it is.
If you don't mind, please take a look :)

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51718
---
 dlls/msi/dialog.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 3ef626a1dfa..bd4a95f4262 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -3893,6 +3893,10 @@ static LRESULT WINAPI MSIDialog_WndProc( HWND hwnd, UINT msg,
             handle_parent_dialog[parent_level - 1] = NULL;
             parent_level--;
         }
+        if (gUIhwnd == hwnd)
+        {
+            gUIhwnd = NULL;
+        }
         dialog->hwnd = NULL;
         return 0;
     case WM_NOTIFY:
@@ -3940,6 +3944,11 @@ static UINT dialog_run_message_loop( msi_dialog *dialog )
         return ERROR_FUNCTION_FAILED;
     }

+    if (parent_level == 0 && !gUIhwnd)
+    {
+        gUIhwnd = hwnd;
+    }
+
     if (parent_level < ARRAY_SIZE(handle_parent_dialog))
     {
         handle_parent_dialog[parent_level] = hwnd;
--
2.33.0




More information about the wine-devel mailing list