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,10 +927,12 @@ void wxFrame::ShowAsActive(Bool flag)
if (!(cStyle & wxFLOAT_FRAME) if (!(cStyle & wxFLOAT_FRAME)
|| !(cStyle & wxNO_CAPTION)) { || !(cStyle & wxNO_CAPTION)) {
TakeoverFocus(); TakeoverFocus();
if (cFocusWindow)
cFocusWindow->OnSetFocus(); cFocusWindow->OnSetFocus();
} }
} else { } else {
ReleaseFocus(); ReleaseFocus();
if (cFocusWindow)
cFocusWindow->OnKillFocus(); cFocusWindow->OnKillFocus();
} }
} }