X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3039af96f6ebff4588f9ebf8a864d2c0e43d8697..47e175a24f862aa8b7ca7dd4a2bb5957991e7f2d:/src/osx/carbon/dialog.cpp?ds=sidebyside diff --git a/src/osx/carbon/dialog.cpp b/src/osx/carbon/dialog.cpp index 8b198abb76..42000d9a52 100644 --- a/src/osx/carbon/dialog.cpp +++ b/src/osx/carbon/dialog.cpp @@ -30,7 +30,7 @@ void wxDialog::EndWindowModal() void wxDialog::DoShowWindowModal() { - // If someone wants to add support for this to wxOSX Carbon, here would + // If someone wants to add support for this to wxOSX Carbon, here would // be the place to start: http://trac.wxwidgets.org/ticket/9459 // Unfortunately, supporting sheets in Carbon isn't as straightforward // as with Cocoa, so it will probably take some tweaking. @@ -39,39 +39,3 @@ void wxDialog::DoShowWindowModal() ShowModal(); SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); } - -void wxDialog::DoShowModal() -{ - - SetFocus() ; - - WindowRef windowRef = (WindowRef) GetWXWindow(); - WindowGroupRef windowGroup = NULL; - WindowGroupRef formerParentGroup = NULL; - bool resetGroupParent = false; - - if ( GetParent() == NULL ) - { - windowGroup = GetWindowGroup(windowRef) ; - if ( windowGroup != GetWindowGroupOfClass( kMovableModalWindowClass ) ) - { - formerParentGroup = GetWindowGroupParent( windowGroup ); - SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) ); - resetGroupParent = true; - } - } - BeginAppModalStateForWindow(windowRef) ; - -#if wxUSE_CONSOLE_EVENTLOOP - wxEventLoopGuarantor ensureHasLoop; -#endif - wxEventLoopBase * const loop = wxEventLoop::GetActive(); - while ( IsModal() ) - loop->Dispatch(); - - EndAppModalStateForWindow(windowRef) ; - if ( resetGroupParent ) - { - SetWindowGroupParent( windowGroup , formerParentGroup ); - } -}