X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a43a9e5521440dbb28037646ed4a07125c8823a9..ae0e22dd7af3fa44819a08c21c9b478688e9d172:/src/osx/cocoa/dialog.mm diff --git a/src/osx/cocoa/dialog.mm b/src/osx/cocoa/dialog.mm index b195a86334..4af807536a 100644 --- a/src/osx/cocoa/dialog.mm +++ b/src/osx/cocoa/dialog.mm @@ -45,17 +45,19 @@ void wxDialog::DoShowModal() } */ NSWindow* theWindow = GetWXWindow(); - + NSModalSession session = [NSApp beginModalSessionForWindow:theWindow]; - int response = 0; - while (IsModal()) + while (IsModal()) { wxMacAutoreleasePool autoreleasepool; // we cannot break based on the return value, because nested // alerts might set this to stopped as well, so it would be // unsafe [NSApp runModalSession:session]; - // TODO Idle + + // do some idle processing + if (wxTheApp) + wxTheApp->ProcessIdle(); } [NSApp endModalSession:session];