moved OnActivate() logic from wxFrame to wxDialog -- this fixes infinite loop when handling WM_ACTIVATE in DefDlgProc in some crazy situations

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-06-13 00:04:22 +00:00
parent 7cc3cec9a7
commit 085ad68651
6 changed files with 104 additions and 76 deletions

View File

@@ -364,6 +364,17 @@ void wxWindowBase::Centre(int direction)
}
}
// we shouldn't center the dialog on the iconized window: under
// Windows, for example, this places it completely off the screen
if ( parent )
{
wxTopLevelWindow *winTop = wxDynamicCast(parent, wxTopLevelWindow);
if ( winTop && winTop->IsIconized() )
{
parent = NULL;
}
}
// did we find the parent?
if ( !parent )
{