Author: manolo
Date: 2011-11-14 09:10:28 -0800 (Mon, 14 Nov 2011)
New Revision: 9177
Log:
Fix STR #2769: Mac OS crash during creation of non-modal window on secondary 
screen

Modified:
   branches/branch-1.3/src/Fl_cocoa.mm

Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-11-14 15:15:03 UTC (rev 9176)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-11-14 17:10:28 UTC (rev 9177)
@@ -2067,6 +2067,10 @@
     [cw setHasShadow:YES];
     [cw setAcceptsMouseMovedEvents:YES];
     x->xid = cw;
+    x->w = w; w->i = x;
+    x->wait_for_expose = 1;
+    x->next = Fl_X::first;
+    Fl_X::first = x;
     FLView *myview = [[FLView alloc] init];
     [cw setContentView:myview];
     [cw setLevel:winlevel];
@@ -2085,10 +2089,6 @@
     if(w->menu_window()) { // make menu windows slightly transparent
       [cw setAlphaValue:0.97];
     }
-    x->w = w; w->i = x;
-    x->wait_for_expose = 1;
-    x->next = Fl_X::first;
-    Fl_X::first = x;
     // Install DnD handlers 
     [myview registerForDraggedTypes:[NSArray arrayWithObjects:
                                      NSStringPboardType,  
NSFilenamesPboardType, nil]];

_______________________________________________
fltk-commit mailing list
fltk-commit@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to