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
This commit is contained in:
Manolo Gouy 2011-11-14 17:10:28 +00:00
parent 74720fd205
commit 12a0cb308e

View File

@ -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]];