Call wxMDIChildFrame::Activate() explicitly as the behaviour was different
under MSW (where the activation happened too late for the test) and GTK where
the child did become active because of the hacks in place to ensure it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74355
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxDocument* const doc = docTemplate.CreateDocument("");
wxView* const view = doc->GetFirstView();
wxDocument* const doc = docTemplate.CreateDocument("");
wxView* const view = doc->GetFirstView();
+ wxScopedPtr<wxMDIChildFrame>
child(new wxDocMDIChildFrame(doc, view, parent.get(), wxID_ANY, "Child"));
wxMenu* const menuChild = CreateTestMenu(child.get());
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
#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