> > This really tricky bug should be fixed now. > > Please check if it works for you ! > > Thanks Fabien, that seems to have got it. > > I wonder if there might be related issues elsewhere that could > possibly manifest the same bug, e.g. my recent fl_text_extents() mod, > etc.? > What do you think - is it likely that the same failure mode can occur? Well, it may technically be possible but I don't think so in practice. The thing is, I hesitated before I did the fix because it was not obvious to decide whether we should be defensive and protect us from having a possible invalid fl_gc use and therefore make sure we have a valid one in all situations or address the problem at its source (which I usually much prefer), but then it meant that we had to guaranty fl_gc is always adequate _before_ we use the fl_width() api ; which appeared to me to be hardly predictable due to the complexity of the fl_width() call graph after some analysis. To bug again, I suppose we would have to be in the situation where a screen hdc (in the worst case, where hWnd==0 and so that we call GetDC(NULL) which further a valid screen dc) is not compatible with the hdc we should use (maybe an offscreen or other special device hdc ?) but also with the assumption that this special hdc is null/invalid at the time of the call too. Fabien.
_______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
