avoid problem with focus leaving before it has arrived(?)

svn: r1488
This commit is contained in:
Matthew Flatt 2005-12-02 14:19:35 +00:00
parent 1aba007321
commit 55037c44cf

View File

@ -927,11 +927,13 @@ void wxFrame::ShowAsActive(Bool flag)
if (!(cStyle & wxFLOAT_FRAME)
|| !(cStyle & wxNO_CAPTION)) {
TakeoverFocus();
cFocusWindow->OnSetFocus();
if (cFocusWindow)
cFocusWindow->OnSetFocus();
}
} else {
ReleaseFocus();
cFocusWindow->OnKillFocus();
if (cFocusWindow)
cFocusWindow->OnKillFocus();
}
}
}