]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/window.cpp
fix for last commit
[wxWidgets.git] / src / os2 / window.cpp
index 14abb69cd1ded9545938f0053f9af5bc38a3878a..97a1e94984bf1886a8ffb50181252bbbf78bec81 100644 (file)
@@ -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