[User32] Fix Dialog Hang

Patch by JIRA contributor I_Kill_Bugs. See CORE-5078.

Also: https://bugs.winehq.org/show_bug.cgi?id=48749
This commit is contained in:
James Tabor 2020-04-08 14:49:38 -05:00
parent 6db3d88984
commit ee3ee2a65f

View file

@ -936,8 +936,14 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
if (IsWindowEnabled( owner )) if (IsWindowEnabled( owner ))
{ {
HWND captured = NULL;
disabled_owner = owner; disabled_owner = owner;
EnableWindow( disabled_owner, FALSE ); EnableWindow( disabled_owner, FALSE );
captured = GetCapture();
if (captured)
SendMessageW(captured, WM_CANCELMODE, 0, 0);
} }
} }
*modal_owner = owner; *modal_owner = owner;