X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/008089f632e0cd66bd7ff23c5eb4ef13ee52c95c..f9e45bd7de9f91efec4edbc0889ea6b2903eaa90:/src/os2/window.cpp?ds=inline diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 14abb69cd1..8da4f9c1a7 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -306,6 +306,16 @@ 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); + } + } if (m_parent) m_parent->RemoveChild(this); DestroyChildren(); @@ -1438,6 +1448,17 @@ void wxWindow::DoMoveWindow( , int nHeight ) { + RECTL vRect; + HWND hParent; + wxWindow* pParent = GetParent(); + + if (pParent) + hParent = GetWinHwnd(pParent); + else + hParent = HWND_DESKTOP; + ::WinQueryWindowRect(hParent, &vRect); + nY = vRect.yTop - (nY + nHeight); + if ( !::WinSetWindowPos( GetHwnd() ,HWND_TOP ,(LONG)nX @@ -3338,6 +3359,7 @@ bool wxWindow::HandlePaint() ,0L ,&vLineBundle ); + ::WinQueryWindowRect(GetHwnd(), &vRect); wxDrawBorder( hPS ,vRect ,m_dwExStyle