Commit cb8ef7d2 authored by Alexandre Julliard's avatar Alexandre Julliard

Dialog window should not be destroyed in DefDlgProc; this break

modeless dialogs.
parent 57f96abe
......@@ -38,7 +38,6 @@ typedef struct
#pragma pack(4)
#define DF_END 0x0001
#define DF_ENDING 0x0002
extern BOOL32 DIALOG_Init(void);
extern HWND32 DIALOG_CreateIndirect( HINSTANCE32 hInst, LPCSTR dlgTemplate,
......
......@@ -266,12 +266,6 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
/* 16 bit dlg procs only return BOOL16 */
if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 )
result = LOWORD(result);
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
}
if (!result && IsWindow32(hwnd))
......@@ -329,12 +323,6 @@ LRESULT WINAPI DefDlgProc32A( HWND32 hwnd, UINT32 msg,
/* 16 bit dlg procs only return BOOL16 */
if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 )
result = LOWORD(result);
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
}
if (!result && IsWindow32(hwnd))
......@@ -392,12 +380,6 @@ LRESULT WINAPI DefDlgProc32W( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
/* 16 bit dlg procs only return BOOL16 */
if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 )
result = LOWORD(result);
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
}
if (!result && IsWindow32(hwnd))
......
......@@ -869,7 +869,6 @@ INT32 DIALOG_DoDialogBox( HWND32 hwnd, HWND32 owner )
}
retval = dlgInfo->idResult;
EnableWindow32( owner, TRUE );
dlgInfo->flags |= DF_ENDING; /* try to stop it being destroyed twice */
DestroyWindow32( hwnd );
return retval;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment