X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/008089f632e0cd66bd7ff23c5eb4ef13ee52c95c..c3d62ecf557627785a4193928fe529f657016932:/src/os2/window.cpp diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 14abb69cd1..97a1e94984 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -306,6 +306,17 @@ wxWindow::~wxWindow() m_isBeingDeleted = TRUE; OS2DetachWindowMenu(); + for (wxWindow* pWin = GetParent(); pWin; pWin = pWin->GetParent()) + { + wxFrame* pFrame = wxDynamicCast(pWin, wxFrame); + + if (pFrame) + { + if (pFrame->GetLastFocus() == this) + pFrame->SetLastFocus((wxWindow*)NULL); + break; + } + } if (m_parent) m_parent->RemoveChild(this); DestroyChildren(); @@ -3338,6 +3349,7 @@ bool wxWindow::HandlePaint() ,0L ,&vLineBundle ); + ::WinQueryWindowRect(GetHwnd(), &vRect); wxDrawBorder( hPS ,vRect ,m_dwExStyle