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

Fabian Maurer dark.shadow4 at web.de
Sat Sep 11 15:12:23 CDT 2021


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51717
Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 dlls/msi/dialog.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 6463c3062ac..193ab84afd4 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -3881,6 +3881,10 @@ 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);
+        }
         dialog->hwnd = NULL;
         return 0;
     case WM_NOTIFY:
@@ -3928,6 +3932,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




More information about the wine-devel mailing list