]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/test.cpp
reusing existing API
[wxWidgets.git] / tests / test.cpp
index cdb57c535ad55c5278c513bbc71d3ef7ff406594..9f304346b4a9efb17b0992b7a68befeeafa64994 100644 (file)
@@ -497,6 +497,14 @@ bool TestApp::OnInit()
 
     m_eventloop = new wxEventLoop;
     wxEventLoop::SetActive(m_eventloop);
+
+#ifdef __WXOSX__
+    // we need to wait until the window is activated and fully ready
+    // otherwise no events can be posted
+    m_eventloop->DispatchTimeout(1000);
+    m_eventloop->Yield();
+#endif
+    
 #endif // wxUSE_GUI
 
     return true;