https://git.reactos.org/?p=reactos.git;a=commitdiff;h=00ace73316c4879f56c1e9137f53f8d7b37e84ba
commit 00ace73316c4879f56c1e9137f53f8d7b37e84ba Author: Doug Lyons <dougly...@douglyons.com> AuthorDate: Wed Dec 29 10:06:28 2021 -0600 Commit: GitHub <nore...@github.com> CommitDate: Wed Dec 29 17:06:28 2021 +0100 [MSI] Improve previous msi/dialog.c patch to match code committed to Wine. (#4008) CORE-17702 Only show the main dialog pane in the taskbar when executing a Cancel dialog. - Improve previous msi/dialog.c patch to match current Wine code. - Remove #ifdef's for already committed Wine Code. In effect, importing Wine's commit 4b88e290521ef9fde9290c9bcbae7420966a6f46: msi: Set dialog as parent in subsequent dialog. Author: Fabian Maurer <dark.shad...@web.de> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51576 --- dll/win32/msi/dialog.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c index 01da9e048ff..c5f1da508c2 100644 --- a/dll/win32/msi/dialog.c +++ b/dll/win32/msi/dialog.c @@ -171,10 +171,6 @@ static const WCHAR szHyperLink[] = {'H','y','p','e','r','L','i','n','k',0}; static DWORD uiThreadId; static HWND hMsiHiddenWindow; -#ifdef __REACTOS__ -static HANDLE hPrevious = NULL; -#endif - static LPWSTR msi_get_window_text( HWND hwnd ) { UINT sz, r; @@ -3823,9 +3819,6 @@ static LRESULT WINAPI MSIDialog_WndProc( HWND hwnd, UINT msg, case WM_DESTROY: dialog->hwnd = NULL; -#ifdef __REACTOS__ - hPrevious = NULL; -#endif return 0; case WM_NOTIFY: return msi_dialog_onnotify( dialog, lParam ); @@ -3848,7 +3841,7 @@ static void process_pending_messages( HWND hdlg ) static UINT dialog_run_message_loop( msi_dialog *dialog ) { DWORD style; - HWND hwnd; + HWND hwnd, parent; if( uiThreadId != GetCurrentThreadId() ) return SendMessageW( hMsiHiddenWindow, WM_MSI_DIALOG_CREATE, 0, (LPARAM) dialog ); @@ -3861,15 +3854,11 @@ static UINT dialog_run_message_loop( msi_dialog *dialog ) if (dialog->parent == NULL && (dialog->attributes & msidbDialogAttributesMinimize)) style |= WS_MINIMIZEBOX; -#ifdef __REACTOS__ - hwnd = CreateWindowW( szMsiDialogClass, dialog->name, style, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hPrevious, NULL, NULL, dialog ); -#else + parent = dialog->parent ? dialog->parent->hwnd : 0; + hwnd = CreateWindowW( szMsiDialogClass, dialog->name, style, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, NULL, dialog ); -#endif + parent, NULL, NULL, dialog ); if( !hwnd ) { @@ -3877,10 +3866,6 @@ static UINT dialog_run_message_loop( msi_dialog *dialog ) return ERROR_FUNCTION_FAILED; } -#ifdef __REACTOS__ - hPrevious = hwnd; -#endif - ShowWindow( hwnd, SW_SHOW ); /* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */