Fl::focus(): allows the focus to be set to an Fl_Window widget.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8532 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
edd848aa9c
commit
f8b645f614
@ -813,7 +813,8 @@ void Fl::focus(Fl_Widget *o) {
|
||||
// make sure that fl_xfocus is set to the top level window
|
||||
// of this widget, or fl_fix_focus will clear our focus again
|
||||
if (o) {
|
||||
Fl_Window *win = 0, *w1 = o->window();
|
||||
Fl_Window *win = 0, *w1 = o->as_window();
|
||||
if (!w1) w1 = o->window();
|
||||
while (w1) { win=w1; w1=win->window(); }
|
||||
if (win) fl_xfocus = win;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user