Is there a method that returns the top-level "window manager window"
for the current widget?

window() is not it; this just returns the parent window
which won't be the top-level window when there are
windows within windows, eg:

   Fl_Window *top = new Fl_Window(..);
   top->begin();
     Fl_Window *sub = new Fl_Window(..);
     sub->begin();
     :

It seems unlikely we don't have such a thing, but I think
supporting nested windows is something recent, and I see
places in our code that do inline loops instead of calling a method.

If there isn't such a method, would like to suggest we add one,
the code being something like:

---
Fl_Window *Fl_Widget::toplevel_window() const {
  Fl_Window *top = window();
  while (top && top->window()) top = top->window();
  return top;
}
---

Comments?
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to