mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:42:57 +00:00
[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.shadow4@web.de> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51576
This commit is contained in:
parent
b94b435a11
commit
00ace73316
1 changed files with 4 additions and 19 deletions
|
@ -171,10 +171,6 @@ static const WCHAR szHyperLink[] = {'H','y','p','e','r','L','i','n','k',0};
|
||||||
static DWORD uiThreadId;
|
static DWORD uiThreadId;
|
||||||
static HWND hMsiHiddenWindow;
|
static HWND hMsiHiddenWindow;
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
|
||||||
static HANDLE hPrevious = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static LPWSTR msi_get_window_text( HWND hwnd )
|
static LPWSTR msi_get_window_text( HWND hwnd )
|
||||||
{
|
{
|
||||||
UINT sz, r;
|
UINT sz, r;
|
||||||
|
@ -3823,9 +3819,6 @@ static LRESULT WINAPI MSIDialog_WndProc( HWND hwnd, UINT msg,
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
dialog->hwnd = NULL;
|
dialog->hwnd = NULL;
|
||||||
#ifdef __REACTOS__
|
|
||||||
hPrevious = NULL;
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
return msi_dialog_onnotify( dialog, lParam );
|
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 )
|
static UINT dialog_run_message_loop( msi_dialog *dialog )
|
||||||
{
|
{
|
||||||
DWORD style;
|
DWORD style;
|
||||||
HWND hwnd;
|
HWND hwnd, parent;
|
||||||
|
|
||||||
if( uiThreadId != GetCurrentThreadId() )
|
if( uiThreadId != GetCurrentThreadId() )
|
||||||
return SendMessageW( hMsiHiddenWindow, WM_MSI_DIALOG_CREATE, 0, (LPARAM) dialog );
|
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))
|
if (dialog->parent == NULL && (dialog->attributes & msidbDialogAttributesMinimize))
|
||||||
style |= WS_MINIMIZEBOX;
|
style |= WS_MINIMIZEBOX;
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
parent = dialog->parent ? dialog->parent->hwnd : 0;
|
||||||
|
|
||||||
hwnd = CreateWindowW( szMsiDialogClass, dialog->name, style,
|
hwnd = CreateWindowW( szMsiDialogClass, dialog->name, style,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
hPrevious, NULL, NULL, dialog );
|
parent, NULL, NULL, dialog );
|
||||||
#else
|
|
||||||
hwnd = CreateWindowW( szMsiDialogClass, dialog->name, style,
|
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
|
||||||
NULL, NULL, NULL, dialog );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if( !hwnd )
|
if( !hwnd )
|
||||||
{
|
{
|
||||||
|
@ -3877,10 +3866,6 @@ static UINT dialog_run_message_loop( msi_dialog *dialog )
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
|
||||||
hPrevious = hwnd;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ShowWindow( hwnd, SW_SHOW );
|
ShowWindow( hwnd, SW_SHOW );
|
||||||
/* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */
|
/* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue