]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/mdi.h
Define WXBUILDING in Xcode projects.
[wxWidgets.git] / include / wx / mdi.h
index 78c2f4c3e47c65f37a05dc153684dd0dcfe38310..52cbed7da4de1516e65f162f6f081a4ab9dab915 100644 (file)
@@ -381,8 +381,18 @@ inline bool wxMDIParentFrameBase::TryBefore(wxEvent& event)
             event.GetEventType() == wxEVT_UPDATE_UI )
     {
         wxMDIChildFrame * const child = GetActiveChild();
-        if ( child && child->ProcessWindowEventLocally(event) )
-            return true;
+        if ( child )
+        {
+            // However avoid sending the event back to the child if it's
+            // currently being propagated to us from it.
+            wxWindow* const
+                from = static_cast<wxWindow*>(event.GetPropagatedFrom());
+            if ( !from || !from->IsDescendant(child) )
+            {
+                if ( child->ProcessWindowEventLocally(event) )
+                    return true;
+            }
+        }
     }
 
     return wxFrame::TryBefore(event);