Hi Albrecht,

Thanks for your very insightful response. I decided to go with your "contains" 
suggestion. My final handle function now looks like this:

int MyWindow::handle(int nevent)
{
  // first handle the event to make sure
  // the new focus is in effect
  int nret = Fl_Window::handle(nevent);

  // store the current focus
  static Fl_Widget* pfocus = 0;

  // if the focus has changed, update decorations
  if (Fl::focus() != pfocus)
  {
    pfocus = Fl:;focus();
    if (pfocus && contains(pfocus))
    {
      // change decorations to indicate child has focus
    }
    else
    {
      // change decorations to indicate child does not have focus
    }
  }

  // return event's return code
  return nret;
}

Thanks again for your help!

Cheers,

Steve.

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

Reply via email to