removing interference between two layering fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-10-09 15:29:50 +00:00
parent 1149bfedc9
commit 0f876f047a

View File

@@ -145,16 +145,16 @@ void wxDialog::DoShowModal()
SetFocus() ;
#if TARGET_CARBON
WindowRef windowRef = (WindowRef) MacGetWindowRef();
WindowGroupRef formerGroup = GetWindowGroup(windowRef) ;
SetWindowGroup( windowRef, GetWindowGroupOfClass( kMovableModalWindowClass ));
WindowGroupRef windowGroup;
WindowGroupRef formerParentGroup;
if ( GetParent() == NULL )
{
windowGroup = GetWindowGroup(windowRef) ;
formerParentGroup = GetWindowGroupParent( windowGroup );
SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) );
}
BeginAppModalStateForWindow(windowRef) ;
#else
// TODO : test whether parent gets disabled
bool formerModal = s_macIsInModalLoop ;
s_macIsInModalLoop = true ;
#endif
while ( IsModalShowing() )
{
@@ -162,13 +162,11 @@ void wxDialog::DoShowModal()
// calls process idle itself
}
#if TARGET_CARBON
EndAppModalStateForWindow(windowRef) ;
SetWindowGroup( windowRef, formerGroup );
#else
// TODO probably reenable the parent window if any
s_macIsInModalLoop = formerModal ;
#endif
if ( GetParent() == NULL )
{
SetWindowGroupParent( windowGroup , formerParentGroup );
}
}