On 10.09.2009, at 14:18, Livia Koch wrote:

> Thank you for your answer!
> I didn't mean that the fault would be in the fltk-code. I simply  
> wanted to trace back which one of the widgets invoked the abortion  
> so as to know where exactly I made a mistake when building up the  
> window with Fl_Scroll - I do get into the code, but I still don't  
> know which one of the widgets causes the damage.
> I will try to make a minimal compileable example, but can you tell  
> me under what conditions fl_throw_focus might abort?

void fl_throw_focus(Fl_Widget *o) {
#ifdef DEBUG
   printf("fl_throw_focus(o=%p)\n", o);
#endif // DEBUG

   if (o->contains(Fl::pushed())) Fl::pushed_ = 0;
#ifndef WIN32
   if (o->contains(fl_selection_requestor)) fl_selection_requestor = 0;
#endif
   if (o->contains(Fl::belowmouse())) Fl::belowmouse_ = 0;
   if (o->contains(Fl::focus())) Fl::focus_ = 0;
   if (o == fl_xfocus) fl_xfocus = 0;
   if (o == Fl_Tooltip::current()) Fl_Tooltip::current(0);
   if (o == fl_xmousewin) fl_xmousewin = 0;
   Fl_Tooltip::exit(o);
   fl_fix_focus();
}

You may have deleted a widget somehow before it was able to throw the  
focus to another widget.

But creating a debug version of the library will help you: you can  
trace back from the point of the crash and look into the label of the  
widget, triggering the issue, and read which one it is.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to