mod/maxgui.mod/fltkmaxgui.mod/src/Fl.cxx
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();
}
// This function is called by ~Fl_Widget() and by Fl_Widget::deactivate
// and by Fl_Widget::hide().  It indicates that the widget does not want
// to receive any more events, and also removes all global variables that
// point at the widget.
// I changed this from the 1.0.1 behavior, the older version could send
// FL_LEAVE or FL_UNFOCUS events to the widget.  This appears to not be
// desirable behavior and caused flwm to crash.
This function is called by ~Fl_Widget() and by Fl_Widget::deactivate
and by Fl_Widget::hide().  It indicates that the widget does not want
to receive any more events, and also removes all global variables that
point at the widget.
I changed this from the 1.0.1 behavior, the older version could send
FL_LEAVE or FL_UNFOCUS events to the widget.  This appears to not be
desirable behavior and caused flwm to crash.
This function is called by ~Fl_Widget () and by Fl_Widget :: deactivate and by Fl_Widget :: hide () . It indicates that the widget does not want to receive any more events and also removes all global variables that point at the widget . I changed this from the 1 . 0 . 1 behavior the older version could send FL_LEAVE or FL_UNFOCUS events to the widget . This appears to not be desirable behavior and caused flwm to crash .
void fl_throw_focus(Fl_Widget *o) {
#ifdef DEBUG
  printf("fl_throw_focus(o=%p)\n", o);
#endif 
  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();
}
void fl_throw_focus ( Fl_Widget * o ) { #ifdef DEBUG printf ( " \n " , o ) ; #endif 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 ( ) ; }
This function is called by ~Fl_Widget() and by Fl_Widget::deactivate
and by Fl_Widget::hide().
This function is called by ~Fl_Widget () and by Fl_Widget :: deactivate and by Fl_Widget :: hide () .
// DEBUG