X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a43a9e5521440dbb28037646ed4a07125c8823a9..cc3fcdff183c0af38f23aa57e5b21b419fc8ee61:/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];