]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docmdi.cpp
Version 0.4 of wxPython for MSW.
[wxWidgets.git] / src / common / docmdi.cpp
index ecb7b1504c6b04c65fe8ec11505bddb39f16806b..4aba2cb48820e0f4809f18cae0356fc648a26aa7 100644 (file)
@@ -24,7 +24,7 @@
 #include "wx/defs.h"
 #endif
 
-#if USE_DOC_VIEW_ARCHITECTURE
+#if wxUSE_DOC_VIEW_ARCHITECTURE
 
 #ifndef WX_PRECOMP
 #include "wx/wx.h"
@@ -108,9 +108,6 @@ wxDocMDIChildFrame::~wxDocMDIChildFrame(void)
 // Extend event processing to search the view's event table
 bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event)
 {
-    if (m_childView)
-        m_childView->Activate(TRUE);
-
        if ( !m_childView || ! m_childView->ProcessEvent(event) )
     {
         // Only hand up to the parent if it's a menu command
@@ -127,7 +124,7 @@ void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event)
 {
   wxMDIChildFrame::OnActivate(event);
 
-  if (m_childView)
+  if (event.GetActive() && m_childView)
     m_childView->Activate(event.GetActive());
 }
 
@@ -152,5 +149,5 @@ bool wxDocMDIChildFrame::OnClose(void)
 }
 
 #endif
-    // USE_DOC_VIEW_ARCHITECTURE
+    // wxUSE_DOC_VIEW_ARCHITECTURE