Backported equivalent of patch #10835 (Make Carbon ShowModal work with IMPLEMENT_APP_NO_MAIN)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2009-09-25 13:39:04 +00:00
parent e221b1ce84
commit ada887153d

View File

@@ -21,6 +21,7 @@
#endif // WX_PRECOMP
#include "wx/mac/uma.h"
#include "wx/evtloop.h"
// Lists to keep track of windows, so we can disable/enable them
@@ -162,11 +163,10 @@ void wxDialog::DoShowModal()
}
BeginAppModalStateForWindow(windowRef) ;
wxEventLoopGuarantor ensureHasLoop;
wxEventLoopBase * const loop = wxEventLoop::GetActive();
while ( IsModalShowing() )
{
wxTheApp->MacDoOneEvent() ;
// calls process idle itself
}
loop->Dispatch();
EndAppModalStateForWindow(windowRef) ;
if ( resetGroupParent )