From 58d4ed8a118b68508613eb0b2b8c8841ec42a9bc Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 25 Sep 2009 10:11:24 +0000 Subject: [PATCH] Applied #10007: SetWindowGroupParent hangs in Mac Carbon dialog.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/dialog.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/osx/carbon/dialog.cpp b/src/osx/carbon/dialog.cpp index 16a77b7ce2..84dbc61448 100644 --- a/src/osx/carbon/dialog.cpp +++ b/src/osx/carbon/dialog.cpp @@ -41,9 +41,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) ; -- 2.45.2