Applied patch #809919 (Allows wxMac threads to run at fullspeed).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2003-11-24 20:53:35 +00:00
parent f39ed413b1
commit e64313babf
4 changed files with 70 additions and 6 deletions

View File

@@ -69,6 +69,7 @@
extern wxList wxPendingDelete;
extern wxList *wxWinMacWindowList;
extern wxList *wxWinMacControlList;
extern size_t g_numberOfThreads;
// statics for implementation
@@ -1250,7 +1251,16 @@ void wxApp::MacDoOneEvent()
if ( wxTheApp->ProcessIdle() )
sleepTime = kEventDurationNoWait ;
else
sleepTime = kEventDurationForever ;
{
if (g_numberOfThreads)
{
sleepTime = kEventDurationNoWait;
}
else
{
sleepTime = kEventDurationSecond;
}
}
}
else if ( status == eventLoopQuitErr )
{
@@ -1284,7 +1294,16 @@ void wxApp::MacDoOneEvent()
if ( wxTheApp->ProcessIdle() )
sleepTime = kEventDurationNoWait;
else
sleepTime = GetCaretTime() / 2 ;
{
if (g_numberOfThreads)
{
sleepTime = kEventDurationNoWait;
}
else
{
sleepTime = kEventDurationSecond;
}
}
}
if ( event.what != kHighLevelEvent )
SetRectRgn( (RgnHandle) s_macCursorRgn , event.where.h , event.where.v , event.where.h + 1 , event.where.v + 1 ) ;