From f70fcfefbf92386c2dd84d3961e61b23285d11be Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 24 Jul 2007 10:22:17 +0000 Subject: [PATCH] fixing layering problems when modal dialogs should appear in front of floating windows (eg miniframes), as long as wxSTAY_ON_TOP is not set on the miniframe git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ;