]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied #10007: SetWindowGroupParent hangs in Mac Carbon dialog.cpp
authorJulian Smart <julian@anthemion.co.uk>
Fri, 25 Sep 2009 10:11:24 +0000 (10:11 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 25 Sep 2009 10:11:24 +0000 (10:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/dialog.cpp

index 16a77b7ce23919e540b0f9a8a0d34ba07fd86b35..84dbc61448b604236c2d04bde28cd9a9e0a3b7aa 100644 (file)
@@ -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) ;