From 12a0cb308ec838972c06b15c269cbb74b2b22a23 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 14 Nov 2011 17:10:28 +0000 Subject: Fix STR #2769: Mac OS crash during creation of non-modal window on secondary screen git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9177 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index cad2081ee..df07d9dae 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2067,6 +2067,10 @@ void Fl_X::make(Fl_Window* w) [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 @@ void Fl_X::make(Fl_Window* w) 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]]; -- cgit v1.2.3