Probably one for Manolo I guess: I don't even understand the question...!
On 19 Dec 2012, at 16:39, claude roux wrote: > Hello, > > I have been using FLTK for quite a while now (about a year), and with some > success. I use the 1.3.2 version, which I have integrated in projects on > Windows, Mac OS and Linux. > > However, I have a real problem on Mac OS, a crash which happens in certain > cases when I mix a (non FLTK) modal window and an FLTK window. When I destroy > the FLTK window, I have a crash... > > I traced the error back to Fl::make_current in Fl_cocoa.mm, with a lockFocus, > which is where the bug is perpetrated... > > For the moment, the only way for me to bypass this problem is to add a > @try/@catch around the lockFocus and I destroy the window... > > void Fl_Window::make_current() { > .. > NSView *current_focus = [NSView focusView]; > // sometimes current_focus is set to a non-FLTK view: don't touch that > @try { > if ( [current_focus isKindOfClass:[FLView class]] ) > [current_focus unlockFocus]; > [[i->xid contentView] lockFocus]; <-- CRASH HERE > } > @catch(NSException* e) { > delete this; <-- VERY HORRIBLE, but it does not seem to matter > return; > } > > > It works, but I do not feel very comfortable to modify the code of a library > which I use on many platform. > > Do you have any idea how I could bypass this error in a more acceptable way? > > Thank you in advance... _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk