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