better support for ui action simulation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -203,6 +203,10 @@ wxCFEventLoop::wxCFEventLoop()
|
||||
m_shouldExit = false;
|
||||
m_processIdleEvents = true;
|
||||
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
m_shouldWaitForEvent = false;
|
||||
#endif
|
||||
|
||||
m_runLoop = CFGetCurrentRunLoop();
|
||||
|
||||
CFRunLoopObserverContext ctxt;
|
||||
@@ -298,6 +302,12 @@ bool wxCFEventLoop::Pending() const
|
||||
|
||||
int wxCFEventLoop::DoProcessEvents()
|
||||
{
|
||||
if ( m_shouldWaitForEvent )
|
||||
{
|
||||
int handled = DispatchTimeout( 10000 );
|
||||
wxASSERT_MSG( handled == 1, "No Event Available");
|
||||
m_shouldWaitForEvent = false;
|
||||
}
|
||||
return DispatchTimeout( 0 );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user