]> git.saurik.com Git - wxWidgets.git/commitdiff
Ensure that the MDI child is active in event propagation test.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Jul 2013 22:17:55 +0000 (22:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Jul 2013 22:17:55 +0000 (22:17 +0000)
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

tests/events/propagation.cpp

index 53441b75c7be8354ea028cd6005817c72ec76693..9f4b05ffcba5af231b1dd49c84703b5930d4c4fa 100644 (file)
@@ -540,11 +540,14 @@ void EventPropagationTestCase::DocView()
     wxDocument* const doc = docTemplate.CreateDocument("");
     wxView* const view = doc->GetFirstView();
 
-    wxScopedPtr<wxFrame>
+    wxScopedPtr<wxMDIChildFrame>
         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