From ada887153d548ccb7345b76efdb29eb73124de70 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 25 Sep 2009 13:39:04 +0000 Subject: [PATCH] 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 --- src/mac/carbon/dialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 8a61ceba87..eb55fab831 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -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 )