~ubuntu-branches/ubuntu/maverick/poedit/maverick

« back to all changes in this revision

Viewing changes to build/wx-2.8.6-mac-dialog-fix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-09-16 19:47:00 UTC
  • mfrom: (0.2.9 upstream) (1.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20080916194700-ueyef0pgklk3u50k
Tags: 1.4.2-2
Adding debug package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
4
 
@@ -145,16 +145,16 @@
5
 
 
6
 
     SetFocus() ;
7
 
 
8
 
-#if TARGET_CARBON
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 )
15
 
+    {
16
 
+        windowGroup = GetWindowGroup(windowRef) ;
17
 
+        formerParentGroup = GetWindowGroupParent( windowGroup );
18
 
+        SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) );
19
 
+    }
20
 
     BeginAppModalStateForWindow(windowRef) ;
21
 
-#else
22
 
-    // TODO : test whether parent gets disabled
23
 
-    bool formerModal = s_macIsInModalLoop ;
24
 
-    s_macIsInModalLoop = true ;
25
 
-#endif
26
 
 
27
 
     while ( IsModalShowing() )
28
 
     {
29
 
@@ -162,13 +162,11 @@
30
 
         // calls process idle itself
31
 
     }
32
 
 
33
 
-#if TARGET_CARBON
34
 
     EndAppModalStateForWindow(windowRef) ;
35
 
-    SetWindowGroup( windowRef, formerGroup );
36
 
-#else
37
 
-    // TODO probably reenable the parent window if any
38
 
-    s_macIsInModalLoop = formerModal ;
39
 
-#endif
40
 
+    if ( GetParent() == NULL )
41
 
+    {
42
 
+        SetWindowGroupParent( windowGroup , formerParentGroup );
43
 
+    }
44
 
 }
45
 
 
46