diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 9ab6e21f66..64f666e418 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -146,7 +146,10 @@ void wxDialog::DoShowModal() SetFocus() ; #if TARGET_CARBON - BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ; + WindowRef windowRef = (WindowRef) MacGetWindowRef(); + WindowGroupRef formerGroup = GetWindowGroup(windowRef) ; + SetWindowGroup( windowRef, GetWindowGroupOfClass( kMovableModalWindowClass )); + BeginAppModalStateForWindow(windowRef) ; #else // TODO : test whether parent gets disabled bool formerModal = s_macIsInModalLoop ; @@ -160,7 +163,8 @@ void wxDialog::DoShowModal() } #if TARGET_CARBON - EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ; + EndAppModalStateForWindow(windowRef) ; + SetWindowGroup( windowRef, formerGroup ); #else // TODO probably reenable the parent window if any s_macIsInModalLoop = formerModal ;