1
diff -ru wxWidgets-2.8.6.orig/src/mac/carbon/dialog.cpp wxWidgets-2.8.6/src/mac/carbon/dialog.cpp
2
--- wxWidgets-2.8.6.orig/src/mac/carbon/dialog.cpp 2007-09-25 10:52:46.000000000 +0200
3
+++ wxWidgets-2.8.6/src/mac/carbon/dialog.cpp 2007-10-10 09:46:34.000000000 +0200
9
WindowRef windowRef = (WindowRef) MacGetWindowRef();
10
- WindowGroupRef formerGroup = GetWindowGroup(windowRef) ;
11
- SetWindowGroup( windowRef, GetWindowGroupOfClass( kMovableModalWindowClass ));
12
+ WindowGroupRef windowGroup;
13
+ WindowGroupRef formerParentGroup;
14
+ if ( GetParent() == NULL )
16
+ windowGroup = GetWindowGroup(windowRef) ;
17
+ formerParentGroup = GetWindowGroupParent( windowGroup );
18
+ SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) );
20
BeginAppModalStateForWindow(windowRef) ;
22
- // TODO : test whether parent gets disabled
23
- bool formerModal = s_macIsInModalLoop ;
24
- s_macIsInModalLoop = true ;
27
while ( IsModalShowing() )
30
// calls process idle itself
34
EndAppModalStateForWindow(windowRef) ;
35
- SetWindowGroup( windowRef, formerGroup );
37
- // TODO probably reenable the parent window if any
38
- s_macIsInModalLoop = formerModal ;
40
+ if ( GetParent() == NULL )
42
+ SetWindowGroupParent( windowGroup , formerParentGroup );