mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[User32]
- Fix dialog pop up crash due to loop. - Sync/Port from wine head, not sure about Staging. svn path=/trunk/; revision=73333
This commit is contained in:
@@ -847,10 +847,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||
|
||||
/* Create dialog main window */
|
||||
|
||||
rect.left = rect.top = 0;
|
||||
rect.right = MulDiv(template.cx, xBaseUnit, 4);
|
||||
rect.bottom = MulDiv(template.cy, yBaseUnit, 8);
|
||||
|
||||
SetRect(&rect, 0, 0, MulDiv(template.cx, xBaseUnit, 4), MulDiv(template.cy, yBaseUnit, 8));
|
||||
if (template.style & DS_CONTROL)
|
||||
template.style &= ~(WS_CAPTION|WS_SYSMENU);
|
||||
template.style |= DS_3DLOOK;
|
||||
@@ -926,24 +923,13 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||
* even if dialog has WS_CHILD, but only for modal dialogs, which matched what
|
||||
* Windows does.
|
||||
*/
|
||||
|
||||
////// Wine'ie babies need to fix your code!!!! CORE-11633
|
||||
if ((GetWindowLongW( owner, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) == WS_CHILD)
|
||||
while ((GetWindowLongW( owner, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) == WS_CHILD)
|
||||
{
|
||||
parent = owner;
|
||||
while ((GetWindowLongW( parent, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) == WS_CHILD)
|
||||
{
|
||||
parent = GetParent( owner );
|
||||
if (!parent || parent == GetDesktopWindow())
|
||||
{
|
||||
parent = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
parent = GetParent( owner );
|
||||
if (!parent || parent == GetDesktopWindow()) break;
|
||||
owner = parent;
|
||||
}
|
||||
else
|
||||
parent = GetAncestor( owner, GA_ROOT );
|
||||
|
||||
////// Wine'ie babies need to fix your code!!!! CORE-11633
|
||||
if (parent)
|
||||
{
|
||||
owner = parent;
|
||||
@@ -2489,6 +2475,9 @@ IsDialogMessageW(
|
||||
{
|
||||
INT dlgCode = 0;
|
||||
|
||||
if (!IsWindow( hDlg ))
|
||||
return FALSE;
|
||||
|
||||
if (CallMsgFilterW( lpMsg, MSGF_DIALOGBOX )) return TRUE;
|
||||
|
||||
if (hDlg == GetDesktopWindow()) return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user