From 9d03cf946c17b86b35d57f7f410901a24fbe7f80 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 25 Sep 2009 10:11:06 +0000 Subject: [PATCH] Applied #10007: SetWindowGroupParent hangs in Mac Carbon dialog.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dialog.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 114be10e4e..8a61ceba87 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -153,9 +153,12 @@ void wxDialog::DoShowModal() if ( GetParent() == NULL ) { windowGroup = GetWindowGroup(windowRef) ; - formerParentGroup = GetWindowGroupParent( windowGroup ); - SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) ); - resetGroupParent = true; + if ( windowGroup != GetWindowGroupOfClass( kMovableModalWindowClass ) ) + { + formerParentGroup = GetWindowGroupParent( windowGroup ); + SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) ); + resetGroupParent = true; + } } BeginAppModalStateForWindow(windowRef) ;