diff --git a/tests/events/propagation.cpp b/tests/events/propagation.cpp index 53441b75c7..9f4b05ffcb 100644 --- a/tests/events/propagation.cpp +++ b/tests/events/propagation.cpp @@ -540,11 +540,14 @@ void EventPropagationTestCase::DocView() wxDocument* const doc = docTemplate.CreateDocument(""); wxView* const view = doc->GetFirstView(); - wxScopedPtr + wxScopedPtr child(new wxDocMDIChildFrame(doc, view, parent.get(), wxID_ANY, "Child")); wxMenu* const menuChild = CreateTestMenu(child.get()); + // Ensure that the child that we've just created is the active one. + child->Activate(); + #ifdef __WXGTK__ // There are a lot of hacks related to child frame menu bar handling in // wxGTK and, in particular, the code in src/gtk/mdi.cpp relies on getting